750 IF DZ<> THEN GOTO 770
Is this equivalent to DZ<>0? Is this statement valid?
I'd like to write a Visual Basic version of the program but I need to
figure out how to handle this line first.
I'll be happy to email the pdf that contains the program to anyone who'd
like to see it.
Thanks,
Mike
mscir at yahoo dot com
>I have a pdf with a Basic program that contains a line I don't
>understand. The line is:
>
>750 IF DZ<> THEN GOTO 770
>
>Is this equivalent to DZ<>0?
>Is this statement valid?
No.
750 IF DZ THEN GOTO 770
Should be valid. And should mean "DZ<>0"
However, all versions of VB that I know of will accept:
IF DZ GOTO 770
Which is a lot less typing.
>
>I'd like to write a Visual Basic version of the program but I need to
>figure out how to handle this line first.
>
>I'll be happy to email the pdf that contains the program to anyone who'd
>like to see it.
>
>Thanks,
>Mike
>mscir at yahoo dot com
--
ArarghMail911 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html
To reply by email, remove the extra stuff from the reply address.
It might be a bug. It's possible that DZ was supposed to be compared against
some other value, but the other value was typo'd out. Was some variable other
than DZ being worked on in the lines immediately prior to this one?
--
Can't wait to get back in the fight.
I think that this is equivalent to
750 IF DZ<> TH GOTO 770
It is an extremely bad idea to use variables with the same names as
keywords but some languages (including PL/1 and perhaps your dialect
of BASIC) allow you to do it. That may look like the keyword THEN but
I think that it was intended to be a variable called TH. Old Microsoft
BASIC interpreters allowed you to use a letter followed by any
combination of letters and numbers as a variables name but only the
first two characters actually meant anything. Great for writing
obfuscated BASIC programs; not so great when put into the hands of the
less competent.
Cheers
Derek
>> I have a pdf with a Basic program that contains a line I don't
>> understand. The line is:
>> 750 IF DZ<> THEN GOTO 770
>> Is this equivalent to DZ<>0?
>> Is this statement valid?
> No.
>
> 750 IF DZ THEN GOTO 770
> Should be valid. And should mean "DZ<>0"
I got a scan of the original article and you're right, they meant DZ<>0,
thanks.
Mike