17.01.2013 Views

AmstradCPC6128-hypertext-en-Sinewalker

AmstradCPC6128-hypertext-en-Sinewalker

AmstradCPC6128-hypertext-en-Sinewalker

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ERR may also return 3 1 if access was attempted wh<strong>en</strong> no file was op<strong>en</strong>. The usual<br />

way in which one may use ERR and D ERR would be to include an 0 N<br />

ERR 0 R GOT 0 which calls a short routine that checks if ERR has the value 3 1 or<br />

32, and if it is 32, DE R R could be interrogated to give more detailed information<br />

regarding the nature of the error. For example:<br />

10 ON ERROR GOTO 1000<br />

20 OPENOUT "myfi le.asc"<br />

30 WRITE #9,"test-data"<br />

40 CLOSEOUT<br />

50 END<br />

1000 amsdoserr=(DERR AND &7F):REM mask off bit 7<br />

1010 IF ERR

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!