$Abbrev: Difference between revisions
 Automatically generated page update  | 
				 Automatically generated page update  | 
				||
| Line 55: | Line 55: | ||
<li>[[List of $functions|Sirius functions]]</li>  | <li>[[List of $functions|Sirius functions]]</li>  | ||
<li>[[Fast/Unload User Language Interface]]</li>  | <li>[[Fast/Unload User Language Interface]]</li>  | ||
<li>[[Media:JoclrNew.pdf|Janus Open Client]</li>  | <li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>  | ||
<li>[http://m204wiki.rocketsoftware.com/images/1/17/JosrvrNew.pdf Janus Open Server]</li>  | <li>[http://m204wiki.rocketsoftware.com/images/1/17/JosrvrNew.pdf Janus Open Server]</li>  | ||
<li>[[Janus Sockets]]</li>  | <li>[[Janus Sockets]]</li>  | ||
Revision as of 21:20, 19 February 2015
Determine if string is abbreviation within list of words
Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no direct OO equivalent for $Abbrev. However, the IsStartOf function can be used to determine whether one string is an initial substring (abbreviation) of another.
This function makes it possible to determine if a string is a valid abbreviation of one of a list of words.
Syntax
%result = $Abbrev(word_list, string)
Syntax terms
| %result | A numeric value that indicates the relative position in word_list of the first word for which string is a valid abbreviation. | 
|---|---|
| word_list | A list of blank-delimited words. | 
| string | The word to be compared with the word_list argument. | 
Return codes
>0 - Number of matching word 0 - No matches found -1 - First parameter missing or null -2 - Second parameter missing or null
Examples
- In the following example, %NUM is set to 2:
%NUM = $Abbrev('TOP BOTTOM MIDDLE MUDDLE', 'B')
 - In the following example, %NUM is set to 3:
%NUM = $Abbrev('TOP BOTTOM MIDDLE MUDDLE', 'M')
 - In the following example, %NUM is set to 4:
%NUM = $Abbrev('TOP BOTTOM MIDDLE MUDDLE', 'MU')
 - In the following example, %NUM is set to 1:
%NUM = $Abbrev('TOP BOTTOM MIDDLE MUDDLE', 'TOP')
 - In the following example, %NUM is set to 0:
%NUM = $Abbrev('TOP BOTTOM MIDDLE MUDDLE', 'MAD')