$Unbind and $UnbindW: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
 
(12 intermediate revisions by 2 users not shown)
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 <var>$Unbind</var> and <var>$UnbindW</var> functions.</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There are no OO equivalents for the $Unbind and $UnbindW functions.</p>


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.
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.
Line 9: Line 9:


==Syntax==
==Syntax==
<p class="syntax"><span class="term">%result</span> = $Unbind(res_name)
<p class="syntax"><span class="term">%result</span> = <span class="literal">$Unbind</span>(<span class="term">res_name</span>)
</p>
</p>


<p class="syntax"><span class="term">%result</span> = $UnbindW(res_name)
<p class="syntax"><span class="term">%result</span> = <span class="literal">$UnbindW</span>(<span class="term">res_name</span>)
</p>
</p>


Line 39: Line 39:
<ul>
<ul>
<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.  
<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.  
<li>The semaphore name specified as the argument to <var>$UnbindW</var> can be an explicit name or it can contain the following wildcard characters:
<table>
<tr><td>*</td>
<td>Matches any number of characters including none</td></tr>
<tr><td>?</td>
<td>Matches any single character</td></tr>
<tr><td>"</td>
<td>Indicates that the next character must be treated literally, even if it is a wildcard character.
</td></tr>
</table>
For example:
<table>
<tr><th>String</th>
<th>Matches</th></tr>
<tr><td>C*D</td>
<td>CUSTID or COD or CLOD</td></tr>
<tr><td>S??T</td>
<td>SALT or SLOT or SORT</td></tr>
<tr><td>E"*CONCRETE</td>
<td>E*CONCRETE</td></tr>
</table>
</ul>
</ul>


==Examples==
==Examples==
The following program unbinds the resource called "SMITHERS".
<ol>
<li>The following program unbinds the resource called "SMITHERS".
<p class="code">b
<p class="code">b
%rc = $Unbind( 'SMITHERS' )
%rc = $Unbind( 'SMITHERS' )
Line 48: Line 77:
</p>
</p>


The semaphore name specified as the argument to $UnbindW can be an explicit name or it can contain the following wildcard characters:
<li>The following program unbinds the all resource that begin with the letters "SMITH".
<table class="syntaxTable">
<tr><th>*</th>
<td>Matches any number of characters including none</td></tr>
<tr><th>?</th>
<td>Matches any single character</td></tr>
<tr><th>"</th>
<td>Indicates that the next character must be treated literally, even if it is a wildcard character.
</td></tr></table>
For example:
<table class="syntaxTable">
<tr><th>d.This string ...</th>
<td>d.Matches ...</td></tr>
<tr><th>C*D</th>
<td>CUSTID or COD or CLOD</td></tr>
<tr><th>S??T</th>
<td>SALT or SLOT or SORT</td></tr>
<tr><th>E"*CONCRETE</th>
<td>E*CONCRETE
</td></tr></table>
 
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>
 
</ol>


==Products authorizing $Unbind and $UnbindW==
==Products authorizing $Unbind and $UnbindW==
<ul class="smallAndTightList">
<ul>
<li>[[Sirius functions]]</li>
<li>[[List of $functions|Sirius functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[Janus Open Server]]</li>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>


[[Category:$Functions|$Unbind and $UnbindW]]
[[Category:$Functions|$Unbind and $UnbindW]]

Latest revision as of 23:27, 20 September 2018

$Unbind and $UnbindW: Unbind resource previously bound via $Bind

Note: Many $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

%result = $Unbind(res_name)

%result = $UnbindW(res_name)

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

    String Matches
    C*D CUSTID or COD or CLOD
    S??T SALT or SLOT or SORT
    E"*CONCRETE E*CONCRETE

Examples

  1. The following program unbinds the resource called "SMITHERS".

    b %rc = $Unbind( 'SMITHERS' ) End

  2. The following program unbinds the all resource that begin with the letters "SMITH".

    B %RC = $UnbindW( 'SMITH*' ) END

Products authorizing $Unbind and $UnbindW