Message box
j
j at clsdesignassociates.com
Mon Mar 29 20:11:38 EST 2004
> function somme a,b
> return a + b
> end somme
works here, also. check for typing errors. as someone else indicated,
function name must abut the opening parenthesis: somme(3,5). you
don't even need to use "put" before the function, if executed from the
message box.
i have always loved this one, myself:
function sumThese
put 0 into theTotal
repeat with i = 1 to the paramCount()
add param(i) to theTotal
end repeat
return theTotal
end sumThese
no need to submit only two numbers to add this way. :) of course, you
can do the same thing with revolution's built-in sum() function, making
this all pretty academic.
j.
More information about the use-livecode
mailing list