Function output-a bug or a feature?
Devin Asay
devin_asay at byu.edu
Fri Feb 13 11:05:04 EST 2004
I sent this a few days ago but I never saw it hit the list. Apologies
if some of you got it twice.
-DNA
Here's the recipe:
Create a new mainstack.
Create a field on the card.
Open the stack script and write a simple function handler. I used this
one:
function cube theNumber
return theNumber^3
end cube
Open the message box and call the new function:
put cube(3) -- works perfectly, the result is displayed in the message
box.
However, try putting the output of the function into the field:
put cube(3) into fld 1 -- the output goes into the message box, not
the field.
If you try this with a standard Transcript function:
put sqrt(4) into fld 1 -- works as expected, with output to the field.
Has this always (not) worked like this? Have I just missed it all these
years? I could swear I've done this successfully before.
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list