$Unbind and $UnbindW: Difference between revisions
m (1 revision) |
m (1 revision) |
||
Line 14: | Line 14: | ||
<p class="caption">$Unbind Function | <p class="caption">$Unbind Function | ||
</p> | </p> | ||
<p class="caption">% | <p class="caption">%result is set to indicate the success of the function.</p> | ||
<p class="code"> | <p class="code"> | ||
Line 29: | Line 29: | ||
<p class="caption">$UnbindW Function | <p class="caption">$UnbindW Function | ||
</p> | </p> | ||
<p class="caption">% | <p class="caption">%result is set to indicate the number of unbound semaphores.</p> | ||
<p class="code"> | <p class="code"> | ||
N - The number of unbound semaphores | N - The number of unbound semaphores |
Revision as of 20:44, 24 October 2012
$Unbind and $UnbindW: Unbind resource previously bound via $Bind
Most Sirius $functions have been deprecated in favor of Object Oriented methods. There are no OO equivalents for the $Unbind and $UnbindW functions.
The $Unbind and $UnbindW functions unbind resources previously bound with the $Bind function. Use $UnBind to unbind a single resource. Use $UnBindW to unbind a set of resources specified with wildcards.
$Unbind and $UnbindW accept one argument and return a numeric code.
The only argument is the name of the resource to be unbound. This resource name can be any string up to 255 bytes long.
Syntax
<section begin="syntax" />%result = $Unbind(res_name) <section end="syntax" />
0 - Resource successfully unbound 1 - Resource name missing 2 - User does not have resource bound
%RESULT = $UnbindW(res_name)
N - The number of unbound semaphores All other errors cause request cancellation
A resource remains bound until it is either explicitly unbound with the $Unbind or $UnbindW function or the binding user logs off or is restarted.
The following program unbinds the resource called "SMITHERS".
B %RC = $Unbind( 'SMITHERS' ) END
The semaphore name specified as the argument to $UnbindW 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:
d.This string ... | d.Matches ... |
---|---|
C*D | CUSTID or COD or CLOD |
S??T | SALT or SLOT or SORT |
E"*CONCRETE | E*CONCRETE |
The following program unbinds the all resource that begin with the letters "SMITH".
B %RC = $UnbindW( 'SMITH*' ) END