Almost time for next update?
Almost time for next update?
In general, PB updates have come approx. every 3 months or so. Are we due for the next one soon?
Will it have:
- All official commands supported on all versions?
- 3D more fully integrated/supported?
- Floats accepted in For/Next loops?
- Even better Interface support (for OPTIONAL OOP programming)?
- Line continuation character?
I can hardly wait!
Russell
Will it have:
- All official commands supported on all versions?
- 3D more fully integrated/supported?
- Floats accepted in For/Next loops?
- Even better Interface support (for OPTIONAL OOP programming)?
- Line continuation character?
I can hardly wait!
Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
-
dell_jockey
- Enthusiast

- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
Re: Almost time for next update?
due to rounding errors with floats, this suggestion doesn't make sense. Now, if PB were to introduce BCD's, you would be on to something, but only marginally so...Amiga5k wrote:Will it have:
- Floats accepted in For/Next loops?
.....
-
DarkDragon
- Addict

- Posts: 2347
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Re: Almost time for next update?
Normally you just code decimals with BCD, not floats, that's why it is called Binary Coded Decimals. You mean fixed comma floats.dell_jockey wrote:due to rounding errors with floats, this suggestion doesn't make sense. Now, if PB were to introduce BCD's, you would be on to something, but only marginally so...Amiga5k wrote:Will it have:
- Floats accepted in For/Next loops?
.....
bye,
Daniel
Daniel
Re: Almost time for next update?
Sorry, Dell_Jockey, but your answer doesn't make sense, since PB is the ONLY Basic dialect I know of that DOESN'T support floats as indexes in For/Next loops. Even very old Basics, such as the Commodore 64's 'V2' Basic allows you to 'step' by fractional amounts in For/Next loops. (Try it in a C64 emulator if you don't believe me).dell_jockey wrote:due to rounding errors with floats, this suggestion doesn't make sense. Now, if PB were to introduce BCD's, you would be on to something, but only marginally so...Amiga5k wrote:Will it have:
- Floats accepted in For/Next loops?
.....
Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
Re: Almost time for next update?
> Try it in a C64 emulator if you don't believe me
This has already been discussed in great length here:
http://www.purebasic.fr/english/viewtopic.php?t=19452
This has already been discussed in great length here:
http://www.purebasic.fr/english/viewtopic.php?t=19452
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Not to continue to beat this dead horse, as they say, but, come to think of it, I don't think there are *any* languages, other than possibly assembler, that don't allow fractional steps in For/Next (or the closest equivilant {Yes, I know it can be done in other types of looping structures in PB}).
It's a minor annoyance, but still should have been added by now (But just about everything else exceeds expectations
)
I have no doubt that it will be added in the near future. Right, Fred?
Russell
It's a minor annoyance, but still should have been added by now (But just about everything else exceeds expectations
I have no doubt that it will be added in the near future. Right, Fred?
Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
And yet somehow programmers have continued to use floats for various purposes, despite this "limitation"... 
Seriously, it should be up to me as to when and where I can use floats. If I know its quirks, I should be the one who decides whether or not to use them in a particular case. For example, obviously I know to not check for a specific value such as 3.2, since the float will most likely have a value of 3.19999982 or whatever. I would instead use somethng like "> 3.19" or "< 3.21" depending on how much precision I'm needing.
Hey, we've got Gosub/Return which is "obsolete", why not this?
Russell
Seriously, it should be up to me as to when and where I can use floats. If I know its quirks, I should be the one who decides whether or not to use them in a particular case. For example, obviously I know to not check for a specific value such as 3.2, since the float will most likely have a value of 3.19999982 or whatever. I would instead use somethng like "> 3.19" or "< 3.21" depending on how much precision I'm needing.
Hey, we've got Gosub/Return which is "obsolete", why not this?
Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
I tend to agree.Amiga5k wrote:Seriously, it should be up to me as to when and where I can use floats.
Opinions on things like this (and other things, eg optional parameters to be anywhere in the argument list -v- just at the end
Then those who want to can, and those who don't want to don't have to.
We can even give a prize to people who code using the ideal (the "PureBasic recommended practices") ..
.. and look pityingly on people who use:
Code: Select all
Procedure myBadPractice(aVar.l, myVar.l = 0, myOtherVar.f)
If myVar = 0
Debug "He He, used an 'embedded' optional, didn't you?"
EndIf
For my.f = 1.0 to myOtherVar
Debug "tut tut, but at least it can be done! " + StrF(my)
Next
EndProcedureDare2 cut down to size
There are countless examples of where a float could be used in loops. (Infinite, in fact, since there are an infinite number of programming goals that one could be pursuing). It could be something as simple as:
The trick would be that a Step value would be required (unlike with Integers), since PB doesn't know what the next value should be: Is it .1 or .01 or .001 etc... With Ints, PB knows that 1 follows 0 and so on.
Anyway, as it's been said, there are other ways to do this without using For/Next:
... but I should be the one to decide what kind of loop structure I want to use. The last line, "Until i > 99.999" allows me to determine how much accuracy is needed (I could use "Until i > 99.9" for less critical situations).
If Fred doesn't want to add it, that's fine; I have gone without it for this long - I'll live. But it would be nice to have it for those rare situations.
Russell
Code: Select all
For i.f = 0 To 100 Step .2
Print i
Next
Anyway, as it's been said, there are other ways to do this without using For/Next:
Code: Select all
i.f = 0
Repeat
Print i
i + .2
Until i > 99.999
If Fred doesn't want to add it, that's fine; I have gone without it for this long - I'll live. But it would be nice to have it for those rare situations.
Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***

