Decimal Fractions < 1

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
chris319
Enthusiast
Enthusiast
Posts: 782
Joined: Mon Oct 24, 2005 1:05 pm

Decimal Fractions < 1

Post by chris319 »

This is totally lame:

Code: Select all

If hpr < .975
Someone give me a valid reason why that line of code should generate a syntax error.

My wish-list item: make PB accept the above line of code.
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Re: Decimal Fractions < 1

Post by Berikco »

chris319 wrote:This is totally lame:

Code: Select all

If hpr < .975
Someone give me a valid reason why that line of code should generate a syntax error.

My wish-list item: make PB accept the above line of code.
.975 is nothing, so why would it compile.
lazy type? ;)

Did you learn in school you could leave the 0 away?

My opinion: If Fred must add all these "nonsens" he will have never time for the real thnigs that must be added/fixed!
Last edited by Berikco on Tue Apr 18, 2006 7:37 pm, edited 1 time in total.
DarkDragon
Addict
Addict
Posts: 2218
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Code: Select all

If hpr < 0.975
I don't know any other programming language, except TI Basic which accepts this unlogic construct.
bye,
Daniel
chris319
Enthusiast
Enthusiast
Posts: 782
Joined: Mon Oct 24, 2005 1:05 pm

Post by chris319 »

Did you learn in school you could leave the 0 away?
Did you learn in school any other programming language besides PB? Name three other computer languages or widely-used implementations of BASIC which will not accept that line of code. ScriptBasic used to require it until I convinced Peter of the stupidity of it.

This is in the same league as requiring a constant after "TO" in a FOR ... NEXT loop (I'm glad that finally got changed).
If Fred must add all these "nonsens" he will have never time for the real thnigs that must be added/fixed!
I know you don't mean to speak for Fred and how he should use his time, but yeah, he could use the few minutes it would take to fix it for something else.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Decimal Fractions < 1

Post by Trond »

Berikco wrote:
Did you learn in school you could leave the 0 away?
He's from the USA. (Now that explains everything... :twisted: )
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

I did not say anything about learning a programming language in school, this has nothing to do with this.
I do speak for Fred in this, we talk a lot in private about the nonsense ppl want to add to PB.
This has absolutely nothing to do with the constant in a for next loop.
It's just basic mathematics you learn in elementary school.

You should not be so lazy and just write 0.975
chris319
Enthusiast
Enthusiast
Posts: 782
Joined: Mon Oct 24, 2005 1:05 pm

Post by chris319 »

Code: Select all

You should not be so lazy and just write 0.975
Answer my question. How many high- or medium-level programming languages can you name which will not accept that line of code? This is one more impediment for anyone wishing to port code from another BASIC which does not require 0.975 to PB.
This has absolutely nothing to do with the constant in a for next loop.
It is just as mindless.

Question for Fred: If you were to change this, how long do you think it would take?
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

How many languages do you know that accept this?

Just to use someone else's words... Boring.. realy boring
Locked