13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

ERDEV, ERDEV$functionsFunctionSyntaxRemarksExampleERDEVand ERDEV$ return device driver information.y = ERDEVy$ = ERDEV$When a device error occurs, integer function ERDEV returns errorinformation in its least-significant byte. This byte represents theINT 24 error code. The most-significant byte contains bits 15, 14,13, 3, 2, 1, and 0 of the device attribute word.ERDEV$ contains the name of the device: 8 bytes for characterdevices and 2 for block devices. (See the IBM DOS TechnicalReference Manual for more information.)I set up an error handlerON ERROR GOTO ErrorHandlerPRINT "Open the door to drive A and press any key •.. "WHILE NOT INSTAT : WEND I wait for a keyI try to get a directoryFILES "A:\*.*"ENDErrorHandler:IIend the programcritical error handlerI display an error message indicatingI problem and sourcePRINT USING "Critical error II occurred with &";ERDEV,ERDEV$RESUME NEXT<strong>Turbo</strong> <strong>Basic</strong> Reference Directory 199

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

Saved successfully!

Ooh no, something went wrong!