Sid,
SL> It's not clear to me why your code fragment doesn't work as you
SL> if err = 4 then restore read temp$ end if
That's exactly why...:) We had the same code fragments & I discovered a
way around this & why it doesn't work. (Might be good to add to the PB-
FAQ)
Here's the wrong version:
-------------------
ON ERROR RESUME NEXT
READ Temp$
IF ERR = 4 THEN
RESTORE
READ Temp$
END IF
DATA Run, Jog, walk
--------------------
In the above example (to my discovery) Once it reaches ERR = 4, it never
"resets" the error to a null. So, once ERR=4 is in memory, it RESTORES
at each call to READ. :)
Here's my correction:
----------------------
ON ERROR GOTO Handler
READ Temp$
DATA Run, Jog, Walk
Handler:
SELECT CASE ERR
CASE 4
RESTORE
RESUME
END SELECT
---------------------
Works like a charm...:)
Thanks for the input, though...
-Ron
* RM 1.3 03129 * Joy fixes us to eternity and pain fixes us to time.
--- TriToss (tm) Professional 11.0 - #229
---------------
* Origin: * Dynasty BBS * The Home of Crazy Nights Software * (1:110/1065.0)
|