DAY 005: ERDEV$ - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: Official Links (https://staging.qb64phoenix.com/forumdisplay.php?fid=16) +--- Forum: Learning Resources and Archives (https://staging.qb64phoenix.com/forumdisplay.php?fid=13) +---- Forum: Keyword of the Day! (https://staging.qb64phoenix.com/forumdisplay.php?fid=49) +---- Thread: DAY 005: ERDEV$ (/showthread.php?tid=1093) |
DAY 005: ERDEV$ - SMcNeill - 11-10-2022 Umm... Our first mystery command! I honestly have no idea what it is, where it came from, who added it to the keyword list or in the IDE, or what the heck it's supposed to do for us. Checking the wiki, I found no entry for it.. Our word of the day is based off the syntax highlighter in the IDE, and for some reason there's both an ERDEV and a ERDEV$ which get highlighted as a keyword. Anyone with any idea of what this is, where it comes from, and when/how we'd make use of it, kindly feel free to speak up on it. As it is, I'm afraid that this time even the mighty Steve has to hang his head in shame -- I have no idea what the heck this beast is!! Code: (Select All) Print erdev$ The above works. I don't see where it does anything but print a blank line and then a zero, but it *does* highlight both of those as keywords. Let's see who can solve the mystery of this one for us! RE: DAY 005: ERDEV$ - vince - 11-10-2022 if Steve doesn't know it what hope do we have? RE: DAY 005: ERDEV$ - Pete - 11-10-2022 It's old school for providing the device specific status information after an error. I've never used it, but in an error trap, my guess is it was used to obtain comm port, maybe printer status, etc. when the process errored out. Now can I get us that brown paper bag? Pete RE: DAY 005: ERDEV$ - RhoSigma - 11-10-2022 From the QuickBASIC 4.5 Manual here: https://ia803001.us.archive.org/12/items/Microsoft_QuickBASIC_4.5_2nd_Edition_Manual/Microsoft_QuickBASIC_4.5_2nd_Edition_Manual.pdf Not supported in QB64: https://qb64phoenix.com/qb64wiki/index.php/Keywords_currently_not_supported_by_QB64 RE: DAY 005: ERDEV$ - Pete - 11-10-2022 Reminds me of a batch file.... ECHO ECHO ECHO I'm not the oldest person in the world, but if I live long enough I will be. RE: DAY 005: ERDEV$ - madscijr - 11-11-2022 (11-10-2022, 09:27 AM)RhoSigma Wrote: Not supported in QB64: This leads me to wonder if any of those non-supported commands are useful? RE: DAY 005: ERDEV$ - madscijr - 11-11-2022 (11-10-2022, 07:32 AM)Pete Wrote: It's old school for providing the device specific status information after an error. I've never used it, but in an error trap, my guess is it was used to obtain comm port, maybe printer status, etc. when the process errored out. Speaking of brown paper bags, I sure wish they'd add a "try...catch" with stack trace, or in the very least the old "on error resume next" with err.number and err.description. Error handling is one thing which QB64 lacks that would make life easier. RE: DAY 005: ERDEV$ - Pete - 11-11-2022 RESUME NEXT works in QB64. ERR returns the error number. For tracing, you'd have to write your own routine. I did that one. Basically you make a program that copies every like of your project and in-between each line adds a call sub that tracks the program flow and sends the progress to a file. Of course program with recursive loops make that a pain to process, but at least it's something. With the fairly new debug features, there is also some kind of trace feature, but since I never make mistakes, I haven't used it. Peeeete |