NadCixelsyd
2010-10-22 21:15:37 UTC
I have just purchased PB, both Windows and Console version, although I
don't think I needed to buy both.
I'm converting a QuickBasic program. If I get to a you-shouldn't-be-
here situation, I simply put out an error message and exit the
program. I sometimes use STOP or SYSTEM. In VisualBasic, I simply
say END. Just so the user (me), knows that a major error has
occurred, sometimes I intentionally raise an error condition. The
only way I can find to exit a PB program is to go to the end of
PBMAIN. That's a pain to code, especially if I'm three functions
deep. Is there a way to just end the program? I've looked at the
manual but I can't find any way to end prematurely.
So I said to myself, "Hey, I'm a mathematician. I'll just divide by
zero to stop". WRONG. I find it incredible that PB doesn't stop.
It's not even an option. "OK," I said, "I'll just take the square
root of a negative number"... That doesn't work either.
And while QB doesn't check for array bounds (VB does), it should at
least be a PB option, especially when I'm debugging a program.
What other common errors does PB simply let slide?
don't think I needed to buy both.
I'm converting a QuickBasic program. If I get to a you-shouldn't-be-
here situation, I simply put out an error message and exit the
program. I sometimes use STOP or SYSTEM. In VisualBasic, I simply
say END. Just so the user (me), knows that a major error has
occurred, sometimes I intentionally raise an error condition. The
only way I can find to exit a PB program is to go to the end of
PBMAIN. That's a pain to code, especially if I'm three functions
deep. Is there a way to just end the program? I've looked at the
manual but I can't find any way to end prematurely.
So I said to myself, "Hey, I'm a mathematician. I'll just divide by
zero to stop". WRONG. I find it incredible that PB doesn't stop.
It's not even an option. "OK," I said, "I'll just take the square
root of a negative number"... That doesn't work either.
And while QB doesn't check for array bounds (VB does), it should at
least be a PB option, especially when I'm debugging a program.
What other common errors does PB simply let slide?