Almost time for next update?

Everything else that doesn't fall into one of the other PB categories.
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Almost time for next update?

Post by Amiga5k »

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
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
aaron
Enthusiast
Enthusiast
Posts: 267
Joined: Mon Apr 19, 2004 3:04 am
Location: Canada
Contact:

Post by aaron »

The Mac and Linux ports are underway.... that stuff will be finished up before any real feature additions are made.
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Re: Almost time for next update?

Post by dell_jockey »

Amiga5k wrote:Will it have:
- Floats accepted in For/Next loops?
.....
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...
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: Almost time for next update?

Post by DarkDragon »

dell_jockey wrote:
Amiga5k wrote:Will it have:
- Floats accepted in For/Next loops?
.....
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...
Normally you just code decimals with BCD, not floats, that's why it is called Binary Coded Decimals. You mean fixed comma floats.
bye,
Daniel
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Re: Almost time for next update?

Post by Amiga5k »

dell_jockey wrote:
Amiga5k wrote:Will it have:
- Floats accepted in For/Next loops?
.....
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...
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).

Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Almost time for next update?

Post by PB »

> 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
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@dell_jockey:
Even C64, BlitzBasic for example are supporting floats for steps ^^
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Post by Amiga5k »

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 :D )

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 ***
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Why on earth would you need floats for something like that? As late as yesterday I saw someone with problems because they used floats and a for loop. A small rounding error became larger as the loop looped.
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Post by Amiga5k »

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
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Can you give an example where you have to use floats?
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

How about in a fractal generator where both axis are fractional parts.

I know you would probably use x=0 to 640 and y=0 to 400 for the screen and use floats just as offsets into the small fractal but it's an example anyway.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Derek wrote:I know you would probably use x=0 to 640 and y=0 to 400 for the screen and use floats just as offsets into the small fractal but it's an example anyway.
But you don't have to use floats.
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Amiga5k wrote:Seriously, it should be up to me as to when and where I can use floats.
I tend to agree.

Opinions on things like this (and other things, eg optional parameters to be anywhere in the argument list -v- just at the end :P ) should be switched - from the development team's personal preference to the coder's personal preference.

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
EndProcedure
:D
Dare2 cut down to size
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Post by Amiga5k »

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:

Code: Select all

For i.f = 0 To 100 Step .2
  Print i
Next
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:

Code: Select all

i.f = 0
Repeat
  Print i
  i + .2
Until i > 99.999
... 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
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
Post Reply