Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

is N<> (nothing) a valid statement?

1 view
Skip to first unread message

mscir

unread,
Nov 22, 2009, 7:20:47 AM11/22/09
to
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?

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

ArarghMai...@not.at.arargh.com

unread,
Nov 22, 2009, 11:55:43 AM11/22/09
to
On Sun, 22 Nov 2009 04:20:47 -0800, mscir <ms...@yahoo.com> wrote:

>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.

Auric__

unread,
Nov 23, 2009, 9:44:22 AM11/23/09
to

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.

Derek

unread,
Nov 23, 2009, 1:58:58 PM11/23/09
to

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

mscir

unread,
Dec 1, 2009, 7:32:09 PM12/1/09
to
ArarghMail911

>> 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

0 new messages