Hi.
I know that this is very stupid question that some has made,but here I go:
How did I plus,multiply or subtract the values of two textfields?
Thanks
Hi.
I know that this is very stupid question that some has made,but here I go:
How did I plus,multiply or subtract the values of two textfields?
Thanks
x=val(textfield1.text)*val(textfield2.text)
Yeah I know thats the “old” framework… but it still works, and I’ll let someone else post the “verbose” version
[quote=191768:@Gerardo García]Hi.
I know that this is very stupid question that some has made,but here I go:
How did I plus,multiply or subtract the values of two textfields?
Thanks[/quote]
I got error
There is more than one item with this name and it’s not clear to which this refers.
x =val(textfield1.text) * val(textfield2.text)
Note: Use CDbl
for values coming from the user (per the docs!)
http://documentation.xojo.com/index.php/Val
http://documentation.xojo.com/index.php/CDbl
[quote=351652:@Marco Ilardi]I got error
There is more than one item with this name and it’s not clear to which this refers.
x =val(textfield1.text) * val(textfield2.text)[/quote]
Break it down
dim a, b, x as double
a = val(textfield1.text)
b = val(textfield2.text)
x = a * b
Where does the error appear?