DAY 005: ERDEV$
#1
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$

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!
Reply
#2
if Steve doesn't know it what hope do we have?
Reply
#3
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
Reply
#4
From the QuickBASIC 4.5 Manual here:
https://ia803001.us.archive.org/12/items...Manual.pdf


[Image: erdev.png]

Not supported in QB64:
https://qb64phoenix.com/qb64wiki/index.p...ed_by_QB64
Reply
#5
Reminds me of a batch file....

ECHO
ECHO
ECHO

Big Grin

I'm not the oldest person in the world, but if I live long enough I will be.
Reply
#6
(11-10-2022, 09:27 AM)RhoSigma Wrote: Not supported in QB64:
https://qb64phoenix.com/qb64wiki/index.p...ed_by_QB64

This leads me to wonder if any of those non-supported commands are useful?
Reply
#7
(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.

Now can I get us that brown paper bag?

Pete

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.
Reply
#8
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
Reply




Users browsing this thread: 9 Guest(s)