I'll ask R&D & let you know what I find out.
Thanks!
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Announcement
Collapse
No announcement yet.
Error 5 line 0
Collapse
X
-
Error 5 line 0
I've had a programing run for 4 1/2 years no problems. PB3.0. All of a sudden 3 different customer are getting this error. I recomplied the program without an error routine and used the addres to find out that the line on the error is "popup sleep" when the program is first loading. Any ideas??
Below is the program code:
$COMPILE EXE
$com 2000
CLS
popup timer 546
dummy& = setmem(-600000)
DECLARE SUB TCDONE ()
DECLARE SUB TCDTR (BYVAL INTEGER)
DECLARE SUB TCINIT (BYVAL INTEGER, INTEGER)
DECLARE SUB TCPARMS (STRING, BYVAL INTEGER, BYVAL INTEGER)
DECLARE SUB TCSPEED (BYVAL LONG)
DECLARE SUB TCWRITE (STRING)
DECLARE FUNCTION TCINKEY$ ()
DECLARE FUNCTION TCINKEY0% ()
DECLARE FUNCTION TCINSTAT% ()
DEFINT A-Z
$LINK "PBWIZ.PBL"
OPEN "\PBSTART" FOR APPEND AS #1
PRINT #1,DATE$;" ";TIME$;" -- Startup"
close #1
open "phone.inf" FOR INPUT AS #1
input #1, tcom, Tbaud, Tparity$, Tdata, TstOp
CLOSE #1
TCDONE
TCINIT TCOM , ERRCODE
IF ERRCoDE THEN PRINT "Init Error"; errcode : end
tcspeed TBAUD%
tcparms TPARITY$, TDATA%, TSTOP%
tnum%=0
terrnum%=0
tnum2%=0
popup sleep ***** this is the line causing the error
do
if tnum% > 1000 then
CLOSE #1
popup sleep USING ems, "C:\PBSWAP.$$$"
tnum%=0
end if
gosub CHECK
tnum% = tnum%+1
loop until 0
CHECK:
while tcinstat
ch = tcinkey0%
if ch>31 then tdata$= tdata$ + chr$(ch)
if ch = 13 then
open "p:\phone.dat" for append as #1
print #1, tdata$ + " {}" + time$ + chr$(13)
terrnum%=0
close #1
if instr(tdata$,"QUIT") OR INSTR(TDATA$,"quit") then
if popup(1) = 0 then print 'Cant Release Memory'
end
end if
tdata$=""
end if
wend
return
Tags: None
Leave a comment: