Connectivity 725
The “Chat” Program
The “Chat” ProgramThe “Chat” Program
The “Chat” Program
The following program uses
GetCalc and SendCalc. The program sets up two loops that
let the linked devices take turns sending and receiving/displaying a variable named
msg.
InputStr lets each user enter a message in the msg variable.
:Chat()
:Prgm
:ClrIO
:Disp "On first unit to send,","
enter 1;","On first to receive,"
:InputStr " enter 0",msg
:If msg="0" Then
: While true
: GetCalc msg
: Disp msg
: InputStr msg
: SendCalc msg
: EndWhile
:Else
: While true
: InputStr msg
: SendCalc msg
: GetCalc msg
: Disp msg
: EndWhile
:EndIf
:EndPrgm
Ê
Ë
Ì
Í
Î
Ï