Page 1 of 1

Covert String to Integer

Posted: 20 Feb 2014 11:02
by Eftychios
Hello,

I have made a Form that has Textbox1, Textbox2, Textbox3 and 1 button.

I want to take the numbers of textbox1 and 2 to perform some calculations when i press the button.

On buttonclick i have written the following code:

Code: Select all

        edit1_AnnualPension := integercontrol::new(This),         edit1_AnnualPension:setPosition(156, 58),         edit1_AnnualPension:setSize(100,12),           Integer = edit1_AnnualPension:getInteger(),         stdIO::write("Integer value = ",Integer, "\n").
but it displays the message "Undeclared identifier 'getInteger()'

And if there is any correction where should i write it ?? cause there are Fact, Predicates, clauses...

Any help plz ??

Posted: 20 Feb 2014 11:22
by Thomas Linder Puls
I believe you have declared the edit1_AnnualPension as a textControl instead of an integerControl.

Code: Select all

facts     edit1_AnnualPension : integerControl.
If the control is inserted by the designer you should insert it as a Custom Control (the icon with the key) and then choose integerControl in the list.

Posted: 20 Feb 2014 13:50
by Eftychios
Thank you very much for your kind help ... you were very helpful