$Unbind and $UnbindW: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 2: Line 2:
<span class="pageSubtitle">$Unbind and $UnbindW: Unbind resource previously bound via $Bind</span>
<span class="pageSubtitle">$Unbind and $UnbindW: Unbind resource previously bound via $Bind</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There are no OO equivalents for the $Unbind and $UnbindW functions.</p>
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There are no OO equivalents for the <var>$Unbind</var> and <var>$UnbindW</var> functions.</p>


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.
The <var>$Unbind</var> and <var>$UnbindW</var> functions unbind resources previously bound with the <var>[[$Bind]]</var> function. Use <var>$UnBind</var> to unbind a single resource.  Use <var>$UnBindW</var> to unbind a set of resources specified with wildcards.


<var>$Unbind</var> and $UnbindW accept one argument and return a numeric code.  
<var>$Unbind</var> and <var>$UnbindW</var> 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==
==Syntax==
<p class="syntax"><section begin="syntax" />%result = $Unbind(res_name)
<p class="syntax"><section begin="syntax" />%result = $Unbind(res_name)
<section end="syntax" /></p>
<section end="syntax" /></p>
<p class="caption">$Unbind Function
 
<p class="syntax"><section begin="syntax" />%result = $UnbindW(res_name)
<section end="syntax" /></p>
 
===Syntax terms===
<table class="syntaxTable">
<tr><th>%result</th>
<td>A [[#Status codes|status code]] that indicates the result of the function.</td></tr>
 
<tr><th>res_name</th>
<td>The name of the resource to be unbound. This resource name can be any string up to 255 bytes long.</td></tr>
</table>
 
===Status codes===
For <var>$Unbind</var>:
<p class="code">0 - Resource successfully unbound
1 - Resource name missing
2 - User does not have resource bound
</p>
</p>
<p class="caption">%result is set to indicate the success of the function.</p>


<p class="code">  
For <var>$UnbindW</var>:
0 - Resource successfully unbound
<p class="code">N - The number of unbound semaphores
1 - Resource name missing
All other errors cause request cancellation
2 - User does not have resource bound
</p>
<p class="caption">$Unbind return codes
</p>
</p>


<p class="code">
==Usage notes==
%RESULT = $UnbindW(res_name)
<ul>
</p>
<li>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.  
<p class="caption">$UnbindW Function
</ul>
</p>
<p class="caption">%result is set to indicate the number of unbound semaphores.</p>
<p class="code">
N - The number of unbound semaphores
All other errors cause request cancellation
</p>
<p class="caption">$UnbindW return codes
</p>
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.  


==Examples==
The following program unbinds the resource called "SMITHERS".
The following program unbinds the resource called "SMITHERS".
<p class="code"> B
<p class="code">b
%RC = $Unbind( 'SMITHERS' )
%rc = $Unbind( 'SMITHERS' )
END
End
</p>
</p>


The semaphore name specified as the argument to $UnbindW can be an explicit name or it can contain the following wildcard characters:
The semaphore name specified as the argument to $UnbindW can be an explicit name or it can contain the following wildcard characters:
Line 67: Line 70:


The following program unbinds the all resource that begin with the letters "SMITH".
The following program unbinds the all resource that begin with the letters "SMITH".
<p class="code"> B
<p class="code">B
%RC = $UnbindW( 'SMITH*' )
%RC = $UnbindW( 'SMITH*' )
END
END
</p>
</p>



Revision as of 21:05, 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.

Syntax

<section begin="syntax" />%result = $Unbind(res_name) <section end="syntax" />

<section begin="syntax" />%result = $UnbindW(res_name) <section end="syntax" />

Syntax terms

%result A status code that indicates the result of the function.
res_name The name of the resource to be unbound. This resource name can be any string up to 255 bytes long.

Status codes

For $Unbind:

0 - Resource successfully unbound 1 - Resource name missing 2 - User does not have resource bound

For $UnbindW:

N - The number of unbound semaphores All other errors cause request cancellation

Usage notes

  • 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.

Examples

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


Products authorizing $Unbind and $UnbindW