Addition-Elementary Style

Jim Ault JimAultWins at yahoo.com
Wed Jan 25 16:17:03 EST 2006


On 1/25/06 1:03 PM, "Michael Mandaville" <transcom at comcast.net> wrote:
> Revolution brothers and sisters,
> On the basis that the most stupid question is the one left unasked, I throw
> myself on the pyre with this question:
>  I have eight multiple text fields.  Numbers will go into these fields.  I
> want all the numbers to add up and go into the Ninth field.
>  Add field1+field2+field3 [etc.,} and put into field Total
> Add field Timeneed + Effort + People [etc.,] and put into field Total
> I have searched the documentation and tried a dozen syntaxes but can't seem
> to get something as fundamental to work.
> 
One way is to 
put field 1 + field 2 + field 3 --msg box shows the answer
put (field 1 + field 2 + field 3) into field sumOfFields

another is
add field 1 to field sumOfFields
add field 2 to field sumOfFields

Are you sure there is not more than one line in these fields?
put (line 1 of field 1)+(line 1 of field 2)

try
put (field 1)*1
which should show you if it is considered a number.

Hope this helps, bro.
Jim Ault
Las Vegas





More information about the use-livecode mailing list