CompuServe Thread

#"SimpleHost"

2 messages in this thread
#44247From: greg reynaNov 24, 1994 10:57 AM
This one has really got me puzzled! I've been using the basic form of "SimpleHost" which is set up like this: hname = "SIMPLE_HOST" shutdown = 0 TRUE = 1 if openport(hname) then do if open('cf','con:400/290/200/20/'hname) then do do until shutdown call waitpkt(hname) pkt = getpkt(hname) rcode = 0 if pkt ~= null() then do cmd = getarg(pkt) call reply pkt,0 if upper(cmd)='EXIT' then do shutdown = 1 end Then, when I added "expose shutdown" to the "Procedure"-marked internal functions, which I thought was the thing to do to make the "quit" available to the functions, the host would initialize "shutdown = 1" just before the final "end", and the host quit! Any idea why this would happen? Greg
#44276From: Bill HawesNov 25, 1994 7:46 AM
Greg, It sounds as though one of your internal functions is accidentally setting shutdown to 1. Have you tried running the host program with tracing turned on to see where shutdown is getting set? -Bill