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_cast( <nstanum>|<astanum>, <cmessage> ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_CAST( <nStanum>|<aStanum>, <cMessage> )


Parameters

<nStanum>
Station number.

<aStanum>
Array of station numbers.

<cMessage>
Text of the message.


Returns

Logical true if the message was received, false if it was not.

Note  Applicable only if you are sending to a single station. If 
you are sending to all stations or an array of stations, then the 
return code is undefined.


Description

N_CAST(<nStanum>) sends a broadcast to a specific station.

<nStanum>     Destination
-1            All stations (not including console)
 0            Server console
1-255         Station number

N_CAST(<aStanum>) sends to a list of stations passed in an array. You
cannot use an array to send a server console message (0) or a message 
to all stations (-1).

The message will automatically be displayed at the target station(s) 
unless receipt of broadcasts has been disabled (with N_SETCAST() or 
console command: CAST OFF).

NetWare will queue a maximum of one message per station at the server. 
Thus, if one message is on display and a second message is waiting at 
the server, a SEND to that station will fail.


Examples

// Send a message to all stations
DO WHILE ! N_CAST(-1, 'Hello, world!')
ENDDO

// Send a message to the station where a user is logged in
IF N_CAST(N_WHERE('ELVIS'), 'Where are you?')
   ? 'He's out there!'
ENDIF

// Send a message to the user who has current record locked
nCulprit = ASC(N_CHECKR(RECNO()))
IF nCulprit > 0
  cMsg = N_WHOAMI(nCulprit ) + ', ' + N_WHOAMI() ;
         + ' wants to modify record ' + STR(RECNO())
   N_CAST(nCulprit, cMsg)
ENDIF



See Also: N_GETCAST() N_PIPE() N_SETCAST()

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