Page 1 of 1

Problem with ERR SET

Posted: Sat Feb 09, 2013 10:31 pm
by Twilighte
Hi, i'm trying to write a BASIC program in Sedoric that detects the presence of a file before loading it from disk.

However the test program below has issues

Code: Select all

10 ERR SET
20 LOAD "SILLY.MEM",V
30 ERR OFF
40 PRINT ST,ED
When run, and silly.mem does not exist on the disk the program returns to the ready prompt and doesn't show any values for ST or ED. Why?
When run, and silly.mem does exist the load parameters are displayed followed by ST and ED that line 40 prints.

I'm using Euphoric in DosBox with Sedoric 3.0 on Oric Atmos ROM V1.1

Re: Problem with ERR SET

Posted: Sat Feb 09, 2013 10:37 pm
by Twilighte
Ok, just found SEARCH command but it still doesn't explain the above.

Re: Problem with ERR SET

Posted: Sun Feb 10, 2013 12:53 pm
by Symoon
Never used this but this is what Sedoric à Nu says about it:
"when ERR SET is on and an error occurs, the program jumps to the line specified by ERRGOTO, if it exists, or it stops, generating a Sedoric or User error message. So a ERRGOTO is required each time you use ERR SET".

Re: Problem with ERR SET

Posted: Sun Feb 10, 2013 1:10 pm
by Symoon
Oh and BTW, each time you use ERR SET or ERR OFF, the ERRGOTO line number is erased and the program is set back to stop and print an error message. That's why ERRGOTO has to be defined after each ERR SET.

Once your ERRGOTO commands have been executed, you can resume the execution where it had crashed (RESUME), or right after the command that crashed (RESUME NEXT).

Re: Problem with ERR SET

Posted: Sun Feb 10, 2013 6:51 pm
by Twilighte
Using Sedoric's SEARCH command seems to work and doesn't generate an error if or if not found but the status must be held in a Sedoric environment variable. Any idea which one?

Dbug linked me to English Sedoric manual but it doesn't seem to hold the environment variable info. :(

Re: Problem with ERR SET

Posted: Sun Feb 10, 2013 7:20 pm
by Symoon
Search sets the EF variable at value 1 if at least 1 file exists, and 0 if none.
So do not test it with TRUE or FALSE !
(once again, thanks to André's Sedoric à Nu ;) )

BTW this is in the French version of the manual too, page 98 with (all ?) other environment variables. Would the translation be incomplete ?

Re: Problem with ERR SET

Posted: Sat Feb 16, 2013 11:59 am
by Twilighte
It works, now in my code i have this...

Code: Select all

SEARCH L$+"-"+E$: IF EF=1 THEN LOAD L$+"-"+E$
Thanks Symoon

Re: Problem with ERR SET

Posted: Sat Feb 16, 2013 7:10 pm
by Symoon
Glad I could help ! :wink:

Re: Problem with ERR SET

Posted: Sun May 27, 2018 9:48 pm
by ibisum
Did anyone end up translating the full Sedoric A Nu to English?