Add $ values input in two flds and placing total in new fld

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
mikemc
Posts: 60
Joined: Sun May 10, 2015 5:42 pm

Add $ values input in two flds and placing total in new fld

Post by mikemc » Wed May 13, 2015 12:22 am

This is some of my first lines of code. What I would like to do is define 3 flds as dollars than add the input in two of the flds and
place the sum in the third fld. Lets call the flds "c1" "c2" and "c3" This would really get me started thanks

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: Add $ values input in two flds and placing total in new

Post by sefrojones » Wed May 13, 2015 12:50 am

Code: Select all

put fld c1 + fld c2 into fld c3
:D

mikemc
Posts: 60
Joined: Sun May 10, 2015 5:42 pm

Re: Add $ values input in two flds and placing total in new

Post by mikemc » Wed May 13, 2015 1:10 am

this is my first line of code and i am missing something very basic when I type
put fld c1 + fld c2 into fld c3 into the script for c3 and change my pointer nothing happens
not to mention how to define a field as a $ value I know this is so basic but thats where i'm at

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Add $ values input in two flds and placing total in new

Post by Simon » Wed May 13, 2015 1:34 am

Hi mikemc,
Here are some of the best places to start
http://www.hyperactivesw.com/revscriptc ... ences.html
http://lessons.runrev.com/

But to you exact question
Drag a button on to the stack with your 3 fields then place sefros code in between the mouseUp handlers.
Leave the $ alone for now just get your addition working.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

mikemc
Posts: 60
Joined: Sun May 10, 2015 5:42 pm

Re: Add $ values input in two flds and placing total in new

Post by mikemc » Wed May 13, 2015 2:02 am

Ok thanks its working now i'll check out the references

Post Reply