BASIC conditionals with 2 outcomes

Discuss all aspects of programming here. From 8-bit through to modern architectures.
User avatar
richmond62
Posts: 172
Joined: Sun Apr 16, 2017 3:15 pm

BASIC conditionals with 2 outcomes

Postby richmond62 » Wed Jun 28, 2017 6:33 pm

I wonder why the following type of thing isn't working?

pseudocode

10 INPUT "a number " W
20 IF W > 5 THEN PRINT ">5" AND SOUND 3,-15,48,50

dp11
Posts: 709
Joined: Sun Aug 12, 2012 8:47 pm

Re: BASIC conditionals with 2 outcomes

Postby dp11 » Wed Jun 28, 2017 6:42 pm

Because it isn't BBC basic. Change AND to :

User avatar
richmond62
Posts: 172
Joined: Sun Apr 16, 2017 3:15 pm

Re: BASIC conditionals with 2 outcomes

Postby richmond62 » Wed Jun 28, 2017 6:44 pm

Because it isn't BBC basic.

That's why I wrote "pseudocode" . . . :mrgreen:

Thanks for the ":" :D


Return to “programming”

Who is online

Users browsing this forum: No registered users and 1 guest