Keven writes:
...
> >3. a function that does not explicitly return a value will either be
> >an error (dislike), or will be void (prefer). A void function would
> >simply be executed inline and erased from the command line image.
>
> So a function called from the CI
> :myfunc()
> would just throw away the result.
You could not execute a function this way, just like you cannot
execute the WORD() function by:
:word("ab cd e fgh i")
You need to put the function in a command that expects an
expression, like SETVAR, IF, WHILE, CALC. Or, since ![expr]
works for all commands, you can embed a user function as:
SomeCICommand ![myfunc()]
...
> >7. function precedence order is that predefined functions take
> >precedence over user defined functions. So, if you define your own
> >"string" function, you need to name it some other name besides "STR",
> >since the CI will always execute the built-in str() function.
>
> hmmm, it may be nice to "replace" a CI function, much like UDC's
> can replace CI commands.
I agree and I've considered this. Please read my reply to Jim Kramer
(loops, that might have been only to the OpenMPE list, so I will
forward that reply to 3000-L). After reading my reply let me know
your opinion.
> Then again, I could change all my scripts to use my string function
> instead of STR, and my script can optionally call STR or do
> something new.
Correct.
thanks,
Jeff
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|