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_setcast( [ <nmode> ] ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_SETCAST( [ <nMode> ] )


Parameters

<nMode>
Broadcast receipt mode (0-3).


Returns

N_SETCAST() returns the current mode.


Description

Broadcast receipt mode can be one of four settings.

Mode     # define     Description
0         CAST_ON     All broadcasts from the 
                      server and from other 
                      stations are displayed 
                      automatically. This is the 
                      mode set by the console
                      command CASTON.

1         CAST_OFF    Server broadcasts are
                      displayed automatically.
                      Station broadcasts are 
                      discarded in transit; they
                      are not allowed to reach the
                      target workstation. This is
                      the mode set by the console 
                      command CASTOFF.

2        CAST_SERVER  Server broadcasts must be 
                      displayed by the program to
                      be seen; if the program does
                      not display them, they don't
                      get seen. Station broadcasts
                      are discarded in transit;
                      they are not allowed to 
                      reach the target 
                      workstation.

3        CAST_ALL     Server broadcasts and 
                      station broadcasts must be
                      explicitly displayed by the
                      program. Select this mode if
                      you are using N_GETCAST() or
                      N_ONCAST().



Examples
// Discard broadcasts from stations.
// Display broadcasts from server automatically.
#include 'CAST.CH'
N_SETCAST(CAST_OFF)

// 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_CAST() N_GETCAST()

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