home *** CD-ROM | disk | FTP | other *** search
- ******************************************************************************
- * PROGRAM ----: TEST.PRG
- * AUTHOR -----: Kevin E. Saffer
- * COPYRIGHT --: None, placed into the public domain
- * CREATED ----: 1/22/1994 at 17:01
- ******************************************************************************
- CLEAR
-
- * set the broadcast mode to normal message handling (CASTON)
- nCurMode = FN_SETBMOD( 0 )
-
- * set up a key procedure to handle key number 1 (ctrl-a)
- SET KEY 1 TO BCMESSAGE
-
- * install the interrupt service routine with this key
- NB_START( 1 )
-
- * wait inside a read
- cString = SPACE(10)
- @ 0,0 SAY "Waiting For Messages" GET cString
- READ
-
- * remove the interrupt service routine and exit
- NB_STOP()
- QUIT
-
- ******************************************************************************
- * keystroke handler
- ******************************************************************************
- PROCEDURE BCMESSAGE
-
- * swallow the keystroke
- INKEY()
-
- * obtain the server connection ID
- nServerId = NB_SERVER()
-
- * retrieve the message array
- aResult = FN_GBM()
-
- * display what we got
- @ 2,0 SAY " Result: " + LTRIM(STR(aResult[1],10,0))
- @ 3,0 SAY "Message: " + aResult[2]
- @ 4,0 SAY " Server: " + LTRIM(STR(nServerId ,10,0))
-
- RETURN