Function output-a bug or a feature?

Klaus Major klaus at major-k.de
Fri Feb 13 11:18:43 EST 2004


Hi Devin,

> I sent this a few days ago but I never saw it hit the list. Apologies 
> if some of you got it twice.
> -DNA

This one suggests a prename like "Gene" :-D

> 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.

Works...

> 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.

Tried here and it works with a 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.

Works here and should work for you...!?

> Devin Asay
> Humanities Technology and Research Support Center
> Brigham Young University

Sorry, totally clueless...


Regards

Klaus Major
klaus at major-k.de
www.major-k.de



More information about the use-livecode mailing list