switch... case 1:

SYS 64738
MarcWalters
Member
Member
Posts: 49
Joined: Wed Jun 11, 2014 2:33 pm
Location: Lake Macquarie, NSW, Australia

Re: switch... case 1:

Post by MarcWalters » Wed Jul 02, 2014 3:31 am

Except "FRE" is a keyword and line 19 will cause a Syntax Error.
Oops. That was a last-second change from the original, tested code. I decided that Frepeat was a better name than Funhandled and didn't bother to test. Sorry about that.



User avatar
Shaun_B
Member
Member
Posts: 179
Joined: Tue May 06, 2014 12:12 pm
Location: UK
Contact:

Re: switch... case 1:

Post by Shaun_B » Wed Jul 02, 2014 10:42 am

MarcWalters wrote:
Except "FRE" is a keyword and line 19 will cause a Syntax Error.
Oops. That was a last-second change from the original, tested code. I decided that Frepeat was a better name than Funhandled and didn't bother to test. Sorry about that.
You're not the first to make this mistake, I've made some similar errors at least twice here. Even if the syntax was wrong, I still got the gist of what your example.

Regards,

Shaun.
BASIC Programming - making the mistakes so that you don't have to.
Circles and Squares.
Nothing I post here will stand up in a court of law.

merman
Member
Member
Posts: 146
Joined: Mon Apr 14, 2014 2:50 pm
Location: Skegness

Re: switch... case 1:

Post by merman » Wed Jul 02, 2014 2:51 pm

Variable names longer than two letters use up extra memory - two is the maximum BASIC "sees". For speed and optimisation, stick to two letters.

satpro

Re: switch... case 1:

Post by satpro » Wed Jul 02, 2014 3:17 pm

merman wrote:Variable names longer than two letters use up extra memory - two is the maximum BASIC "sees". For speed and optimisation, stick to two letters.
That is a very good point.

Post Reply Previous topicNext topic