Adding numbers

Jamie Meta at Dimensional.com
Tue Dec 11 13:39:00 EST 2001


And if you have to add a lot of numbers at once you can use the
"sum" function. For example: 

on closeField
  put sum (field "thisfield", field "thatfield", field
"someotherfield") into field "result" 
end closeField

Best Regards,
 -Jamie

Devin Asay wrote:
> 
> At 10:57 AM -0500 12/11/01, Mike McKenzie wrote:
> >My appologizes to the programers here, but as I am not, my questions will be
> >of the "dumb" variety. I wish I had a printed manual so I could try to find
> >the answers off-line. Anyway here's my question:
> >
> >How do I perform a math function (like add, subtract, etc.) on the number
> >input into a text field and then display the result in another textfield?
> >(Just your basic spreadsheet)
> 
> put fld "foo" + 15 into fld "bar"
> 
>   -- OR
> 
> put fld "foo" + fld "bar" into fld "foobar"
> 
> -- OR
> 
> add 15 to fld "foo"  -- result will appear in fld "foo"
> 
> >Also how do I restrict the input to only numbers?
> >
> 
> if not (inputVariable is a number) then ...
> 
> Devin
> --
> Devin Asay
> Humanities Research Center
> Brigham Young University
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the Use-livecode mailing list