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_where( <cuserid> [, <nstart> ] ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_WHERE( <cUserid> [, <nStart> ] )


Parameters

<cUserid>
User login name.

<nStart>
Station number from which to begin searching. Default is 1.


Returns

Logical station number (1-255). Zero if the specified user is not 
logged in or if the program is running on a stand-alone system.


Description

If <nStart> is specified, the search will begin at that station. 
Specifying a starting station number for a search is useful if the user 
may be logged in at more than one station.


Examples

// See where Watson is logged in so we
// can send her a message.
nStanum = N_WHERE('WATSON')
N_CAST(nStanum, 'Watson come here. I need you.')

// Search for a user on the current server. Return
// a list of stations where the user is logged in.
FUNCTION WhereIs( cUser )
   LOCAL nStanum, aStations := {}
   nStanum = N_WHERE( cUser )
   DO WHILE nStanum > 0
      AADD(aStations, nStanum)
      nStanum = N_WHERE(cUser, nStanum + 1)
   ENDDO
RETURN aStations




See Also: N_SERVER() N_STANUM() N_WHOAMI()

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