UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

Parameters The following table describes each parameter of the syntax. Parameter Description Examples In the following example, the program statement reserves resource 12 if another program is not using it. If resource 12 is already in use, the current program suspends execution and waits until UniData unlocks resource 12. LOCK 12 In the next example, the program segment locks resource 44 if it is available. If it has already been locked, the program attempts to lock resource 45. If both resources are unavailable, the program stops. 1-426 UniBasic Commands Reference resource.num Specifies a number associated with a resource. resource.num can be any number from 0 through 63. For assistance in assigning resource numbers, see your system administrator. THEN statements END Specifies statements to execute if the LOCK statement executes successfully. ELSE statements END Specifies statements to execute if another user has reserved the resource (using the same resource number) so that the LOCK statement fails to lock it. If you do not specify an ELSE clause and the requested resource has already been locked, the current program waits until that resource is released. Use the ECL command DEFAULT.LOCKED.ACTION BELL to make the terminal beep while you wait for UniData to release the lock. LOCK Parameters T1 = 44; T2 = 45 LOCK T1 ELSE LOCK T2 ELSE STOP

Related Commands UniBasic UNLOCK UniData CLEAR.LOCKS, LIST.LOCKS, SUPERCLEAR.LOCKS, DEFAULT.LOCKED.ACTION – For information, see the UniData Commands Reference. LOCK 1-427

Related <strong>Commands</strong><br />

<strong>UniBasic</strong><br />

UNLOCK<br />

UniData<br />

CLEAR.LOCKS, LIST.LOCKS, SUPERCLEAR.LOCKS,<br />

DEFAULT.LOCKED.ACTION – For information, see the UniData <strong>Commands</strong><br />

<strong>Reference</strong>.<br />

LOCK 1-427

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!