$Bind_List

From m204wiki
Revision as of 17:35, 28 January 2011 by 198.242.244.47 (talk) (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 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<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" />

$Bind_List Function

%RC is a number of items added to %OLIST, or is a negative error code.

>= 0 - Number of bound semaphores returned -3 - $list full or out of CCATEMP All other errors result in request cancellation

$Bind_List return codes


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.

Products authorizing $Bind_List