Page 1 of 1

Additional parameters to commands and functions

Posted: Sun Apr 25, 2004 11:42 am
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:

Posted: Sun Apr 25, 2004 12:38 pm
by freak
Round() always returned a Float value.

Timo

Posted: Sun Apr 25, 2004 3:18 pm
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. :)

Posted: Mon Apr 26, 2004 9:12 pm
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