Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_checks( <csemaphore> [, <nstanum> ] ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_CHECKS( <cSemaphore> [, <nStanum> ] )


Parameters

<cSemaphore>
Semaphore name.

<nStanum>
Optional station number to query. If omitted, all currently logged-in 
stations, except for the current station, are queried.


Returns

A one byte string containing the ASCII code of the station number (CHR 
1-255) if any, that has the specified semaphore string locked.

The current station is never returned, even if it does have the 
semaphore locked. Use N_ISSLOCK() instead. A null string indicates that 
no other station has the semaphore locked.


Description

If <nStanum> is specified, only that station is queried. If <nStanum> 
is omitted, all stations are queried.


Example

// Attempt to lock semaphore.
// If not successful, determine who has it locked.
IF !N_SLOCK('myturn')
   station_list = N_CHECKS('myturn')
   @ 1, 0 SAY 'Semaphore locked by station + STR(ASC(station_list))
ENDIF



See Also: N_ISSLOCK() N_MONITOR() N_SLOCK()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson