Adding numbers

Geoff Canyon gcanyon at
Tue Dec 11 11:45:01 EST 2001

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)
>Also how do I restrict the input to only numbers?

You can create your own printed manual using the RTFer stack: <>

You can perform math functions just by describing them. For the above, for example, you might use:

put 5 + field "some field" into fld "another field"

To verify that something is a number, just say so:

if field "some field" is a number then
  put 5 + field "some field" into fld "another field"
  answer "Please enter a number!"
end if



More information about the use-livecode mailing list