Additional parameters to commands and functions

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
wcardoso
User
User
Posts: 80
Joined: Fri Apr 25, 2003 5:06 pm
Location: Uruguay

Additional parameters to commands and functions

Post by wcardoso »

Fred, can you modify the commands and functions to acept a new parameter to modify his behaviour and this way be compatible with the existing code ?.
For example Round(x) now return a float value, but in older PB versions the value was an integer; so Round(x) must return an integer (back compatible) and Round(x, #Float) may return a float value.
The same for others functions, Int(), etc.
The compiler must be capable to manage this additional parameters without rise an error flag.
:wink:
with love from Uruguay
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Round() always returned a Float value.

Timo
quidquid Latine dictum sit altum videtur
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

oh well its easy to fix that when it happens, and if you fix it yourself, maybe you wont need to add so much bloat to the language and make it more simple. :)
User avatar
the.weavster
Addict
Addict
Posts: 1577
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Post by the.weavster »

How about an event-handler procedure parameter?

It would simplify the creation of the event loop from the VD. Any gadgets which did not have an associated procedure would not need to be included in the loop, plus the loop could be regenerated any time the design changed and nothing would be lost.

You'd just have to put the procedures themslves in a seperate *.pb file.

It's late and I'm making this up as I go along so if I'm missing something obvious feel free to shoot me down in flames.

Weave
Post Reply