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_oncast( <cprocedure>|<nkey> ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_ONCAST( <cProcedure>|<nKey> )

Parameters

<cProcedure>
Name of the procedure to call.

<nKey>
ASCII value of a key to stuff onto the keyboard.

Returns
NIL

Description

The procedure named in <cProcedure> is called when a broadcast message 
has been received. In order for the event to occur, you must have first 
called N_SETCAST(CAST_ALL).

Example

// Retrieve all broadcast messages received.
#include 'CAST.CH'
N_SETCAST(CAST_ALL)
N_ONCAST('DisplayBroadcast')
.
.
.
PROCEDURE DisplayBroadcast
LOCAL cMsg, cBuffer
   IF N_GETCAST(@cMsg)
      SAVE SCREEN TO cBuffer
      @ 1, 0 SAY 'Message: ' + cMsg
      @ ROW() + 1, 0 SAY 'Press any key...'
      INKEY(0)
      RESTORE SCREEN FROM cBuffer
   ENDIF
RETURN

Files

CAST.CH


See Also: N_GETCAST() N_SETCAST()

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