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_getcast( [ @<cmessage> ] ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_GETCAST( [ @<cMessage> ] )


Parameters

<cMessage>
Name of the memory variable in which to store a message. It must be 
passed by reference (that is, prefixed with @).


Returns

N_GETCAST() returns a broadcast message, if one is pending, or a null 
string if one is not.

N_GETCAST(@<cMessage>) returns logical true if a message is pending 
and stores the message in the memory variable. If no message is 
pending, the function returns false, in which case the memory variable 
is unchanged.


Description

A pending broadcast message is stored in the memory variable passed as 
the optional argument. The memory variable must be initialized prior 
to calling the function, but its data type and value are unimportant 
since the function will modify it as required. It must be passed by 
reference (that is, prefixed with @) so that N_GETCAST() can modify it.

Note  This function is meaningless unless you first call N_SETCAST(3).


Example

// Check for a broadcast and display it
N_SETCAST(3)      // store messages
cMsg = .F.
IF N_GETCAST(@cMsg)
   @ 1, 0 SAY 'Message: ' + cMsg
ENDIF

// Same thing without the parameter
N_SETCAST(3)      // store messages
cMsg = N_GETCAST()
IF !EMPTY(cMsg)
   @ 1, 0 SAY 'Message: ' + cMsg
ENDIF



See Also: N_CAST() N_SETCAST()

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