It is currently Thu Mar 23, 2017 5:02 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: minor bug with misspelled LET statement
Unread postPosted: Mon Jan 30, 2017 3:32 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 408
It took me awhile before I figured out that I accidentally hit Y instead of T on my QWERTY keyboard.

The program still runs but the values of bb and rr are different.

In most cases I don't bother to use LET and am not sure it makes a speed difference anymore, but
BASIC! should probably throw an error.


Code:
REM Start of BASIC! Program

w=1
LET xb=w/2.33
ley yb=w/4.11
LET xr=w/2.33
LET yr=w/4.11

xc=1
yc=1

bb=xb*xc-yb*yc
rr=xr*xc-yr*yc
PRINT STR$(bb),STR$(rr)


Top
 Profile  
 
 Post subject: Re: minor bug with misspelled LET statement
Unread postPosted: Mon Jan 30, 2017 5:32 pm 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 626
Location: UK
cterp wrote:
It took me awhile before I figured out that I accidentally hit Y instead of T on my QWERTY keyboard.

The program still runs but the values of bb and rr are different.

In most cases I don't bother to use LET and am not sure it makes a speed difference anymore, but
BASIC! should probably throw an error.


Code:
REM Start of BASIC! Program

w=1
LET xb=w/2.33
ley yb=w/4.11
LET xr=w/2.33
LET yr=w/4.11

xc=1
yc=1

bb=xb*xc-yb*yc
rr=xr*xc-yr*yc
PRINT STR$(bb),STR$(rr)

Unfortunately Basic! cannot throw an error because it removes all the spaces, so your "ley" becomes "leyyb=w/4.11". Variable "yb" is absent.

So this is not a bug, minor or otherwise, just an unfortunate (IMHO!) design choice...

Mike.


Top
 Profile  
 
 Post subject: Re: minor bug with misspelled LET statement
Unread postPosted: Thu Feb 02, 2017 5:20 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 408
Ugh..... not a nice feature at all... this took me quite some time for my biased brain to spot.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
suspicion-preferred