$Bind List: Difference between revisions
(Created page with "{{DISPLAYTITLE:$Bind_List}} <span class="pageSubtitle"><section begin="desc" />Return list of bound semaphores onto a $list<section end="desc" /></span> <p class="warning">Most ...") |
m (1 revision) |
(No difference)
|
Revision as of 15:44, 31 January 2011
<section begin="desc" />Return list of bound semaphores onto a $list<section end="desc" />
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Bind_List function is to be entered.
This function retrieves semaphores bound with $Bind by a specific or all users.
The $Bind_List function accepts three arguments and returns a number indicating the success of the function.
The first argument is the output $list identifier. If the output $list is not empty data is added to the end of the output $list. This is a required argument.
The second argument is the name of the semaphore for which information is to be returned. This argument can contain a single specific semaphore name or it can contain a wildcard string that matches a number of semaphores. This is an optional argument and defaults to "*" which means to return all semaphores bind by all or a specific user.
The third argument is the user number of the user for which bound semaphores are to be returned. This is an optional argument and defaults to -1 which means return semaphores bound by all users.
Syntax
<section begin="syntax" /> %RC = $Bind_List(olist, sem_name, user_num) <section end="syntax" />
>= 0 - Number of bound semaphores returned -3 - $list full or out of CCATEMP All other errors result in request cancellation
- bxtab lab="Output $list format" col1=17 :bxcol1 bold=yes.Offset :bxcol2 bold=yes.Contents :bxcol1.0 - 4 :bxcol2.The user number of the user that has the semaphore bound represented as a string with leading zeros included. :bxcol1.5 - 14 :bxcol2.The userid of the user that has the semaphore bound represented as a string padded with trailing blanks. :bxcol1.15 - end :bxcol2.The name of the bound semaphore. :ebxtab.
The semaphore name specified in the second argument can be an explicit name or it can contain the following wildcard characters:
* | Matches any number of characters including none |
---|---|
? | Matches any single character |
" | Indicates that the next character must be treated literally even if it is a wildcard character. |
For example, "C*D" matches "CUSTID", "COD" or "CLOD". "S??T" matches "SALT", "SLOT" or "SORT". "E"*CONCRETE" matches "E*CONCRETE".
The following code fragment retrieves all semaphores bound by the current user where the semaphore name ends with the letters "_TEMP" into a $list and sorts the $list by semaphore name.
%RC = $Bind_List(%OLIST, '*_TEMP', $USER) %SLIST = $ListSort(%OLIST, '16,255, A')
$Bind_List is only available in Version 6.0 and later of the Sirius Mods.