$Bind List: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 2: Line 2:
<span class="pageSubtitle"><section begin="desc" />Return list of bound semaphores onto a $list<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />Return list of bound semaphores onto a $list<section end="desc" /></span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Bind_List function is [[to be entered]].</p>
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $Bind_List function.</p>


This function retrieves semaphores bound with $Bind by a specific or all users.  
This function retrieves semaphores bound with $Bind by a specific or all users.  
Line 19: Line 19:
</p>
</p>
<p class="caption">%RC is a number of items added to %OLIST, or is a negative error code.</p>
<p class="caption">%RC is a number of items added to %OLIST, or is a negative error code.</p>
<p class="code">  
<p class="code">  
  >= 0 - Number of bound semaphores returned
  >= 0 - Number of bound semaphores returned
-3 - $list full or out of CCATEMP
  -3 - $list full or out of CCATEMP
All other errors result in request cancellation
All other errors result in request cancellation
</p>
</p>
<p class="caption">$Bind_List return codes
<p class="caption">$Bind_List return codes
</p>
</p>


Output $list format
<p class="code">
  Offset      Contents
  0-4      The user number of the user that has the semaphore bound
              represented as a string with leading zeros included.
  5-14    The userid of the user that has the semaphore bound
              represented as a string padded with trailing blanks.
  15-end  The name of the bound semaphore.
</p>


: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:


The semaphore name specified in the second argument can be an explicit name or it can contain the following wildcard characters:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>*</th>
<tr><th>*</th>
Line 39: Line 47:
<tr><th>"</th>
<tr><th>"</th>
<td>Indicates that the next character must be treated literally even if it is a wildcard character.
<td>Indicates that the next character must be treated literally even if it is a wildcard character.
</td></tr></table>
</td></tr>
</table>
 
For example, "C*D" matches "CUSTID", "COD" or "CLOD". "S??T" matches "SALT", "SLOT" or "SORT". "E"*CONCRETE" matches "E*CONCRETE".  
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.
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.
<p class="code"> %RC = $Bind_List(%OLIST, '*_TEMP', $USER)
<p class="code"> %RC = $Bind_List(%OLIST, '*_TEMP', $USER)
  %SLIST = $ListSort(%OLIST, '16,255, A')
%SLIST = $ListSort(%OLIST, '16,255, A')
</p>
</p>


$Bind_List is only available in Version 6.0 and later of the ''[[Sirius Mods]]''.


$Bind_List is only available in Version 6.0 and later of the ''[[Sirius Mods]]''.
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[Sirius functions]]</li>

Revision as of 16:37, 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. There is no OO equivalent for the $Bind_List function.

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

Output $list format

Offset Contents 0-4 The user number of the user that has the semaphore bound represented as a string with leading zeros included. 5-14 The userid of the user that has the semaphore bound represented as a string padded with trailing blanks. 15-end The name of the bound semaphore.

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