home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMIGA PD 1
/
AMIGA-PD-1.iso
/
Programme_zum_Heft
/
Programmieren
/
Kurztests
/
ACE
/
Prgs
/
ACEports
/
wait
/
writer.b
< prev
Wrap
Text File
|
1994-10-03
|
802b
|
46 lines
'..Test of ACE messaging functions: writer.
string buffer
msg$="Hello from writer!"
window 1,"Writer",(0,0)-(640,100),0
font "topaz",8
locate 1,1
'..write a message to reader.
repeat
print "waiting for creation of port called 'reader'."
message open #1,"reader","w"
sleep for .25
until err<>400
message write #1,msg$
if err<>403 then
print "WRITER -> READER: ";msg$
message wait #1
end if
'..create a port for this program called "writer"
message open #2,"writer","R"
if err=400 then
print "can't create a message port!"
goto quit
end if
'..await a message from reader.
message wait #2
message read #2,buffer
if ERR<>402 then print "WRITER <- READER: ";buffer
quit:
print
print "Press a key..."
while inkey$="":sleep:wend
message close #1
message close #2
window close 1
END