It is currently Tue May 23, 2017 3:49 am



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  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: why is a leading zero required for decimal constants ?
Unread postPosted: Thu Nov 24, 2016 8:28 am 
Offline

Joined: Thu Nov 24, 2016 8:22 am
Posts: 3
x = .5 %generates a syntax error
x = 0.5 % is OK


Top
 Profile  
 
 Post subject: Re: why is a leading zero required for decimal constants ?
Unread postPosted: Thu Nov 24, 2016 8:40 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5518
Location: Paris, France
Hi Gordon,

This is not a bug, this is in the manual

Nicolas

_________________
- Creator of the Android BASIC! Compiler


Top
 Profile  
 
 Post subject: Re: why is a leading zero required for decimal constants ?
Unread postPosted: Thu Nov 24, 2016 8:48 am 
Offline

Joined: Thu Nov 24, 2016 8:22 am
Posts: 3
Thanks.
It has caught me out a few times. :-)


Top
 Profile  
 
 Post subject: Re: why is a leading zero required for decimal constants ?
Unread postPosted: Fri Nov 25, 2016 12:45 pm 
Offline
User avatar

Joined: Sun Nov 23, 2014 8:15 am
Posts: 2185
Location: romania
and there are some more 'tips' to discover. just read the manual.


Top
 Profile  
 
 Post subject: Re: why is a leading zero required for decimal constants ?
Unread postPosted: Sat Nov 26, 2016 2:33 am 
Online

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
Gordon wrote:
Thanks.
It has caught me out a few times. :-)

I thought most computer languages require at least one digit before the decimal point. Know any that don't?

Mike.


Top
 Profile  
 
 Post subject: Re: why is a leading zero required for decimal constants ?
Unread postPosted: Sat Nov 26, 2016 1:28 pm 
Offline

Joined: Tue Nov 15, 2016 8:47 am
Posts: 56
Sir,

I used to program in Commodore 64 BASIC. I believe that doesn't require a leading digit. That was 30 years ago or such so my memory could be wrong.

Thank you.


Top
 Profile  
 
 Post subject: Re: why is a leading zero required for decimal constants ?
Unread postPosted: Sat Nov 26, 2016 1:31 pm 
Offline

Joined: Tue Nov 15, 2016 8:47 am
Posts: 56
Addendum:

If you would like to try Borland Turbo C 2.01 that one doesn't require a leading digit Sir.

Sincerely,

"Clark" Tien


Top
 Profile  
 
 Post subject: Re: why is a leading zero required for decimal constants ?
Unread postPosted: Sat Nov 26, 2016 5:52 pm 
Offline
User avatar

Joined: Thu Nov 24, 2016 8:26 pm
Posts: 49
Location: GA, USA
clarktntien wrote:
Addendum:

If you would like to try Borland Turbo C 2.01 that one doesn't require a leading digit Sir.

Sincerely,

"Clark" Tien

LOL That brings back memories! I believe it came on 3 floppies. Do you still have a DOS box running?

The opening screen. Click it to see it a little larger.
Image

Don't remember if a leading zero was necessary, but I believe you.

_________________
A good programmer is someone who always looks both ways before crossing a one-way street.


Top
 Profile  
 
 Post subject: Re: why is a leading zero required for decimal constants ?
Unread postPosted: Sat Nov 26, 2016 6:42 pm 
Offline

Joined: Tue Nov 15, 2016 8:47 am
Posts: 56
Wow Yoshi,

I love that screen. Just seeing it makes me realize I've been taking it for granted for so long and didn't realize what a gem it is.


Top
 Profile  
 
 Post subject: Re: why is a leading zero required for decimal constants ?
Unread postPosted: Sat Nov 26, 2016 6:50 pm 
Offline
User avatar

Joined: Thu Nov 24, 2016 8:26 pm
Posts: 49
Location: GA, USA
clarktntien wrote:
Wow Yoshi,

I love that screen. Just seeing it makes me realize I've been taking it for granted for so long and didn't realize what a gem it is.

Spent thousands and thousands of hours working with Borland. :D

_________________
A good programmer is someone who always looks both ways before crossing a one-way street.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next


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