Discussions related to Visual Prolog
Eftychios
Posts: 14
Joined: 19 Feb 2014 10:37

Covert String to Integer

Unread post 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 ??
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post 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.
Regards Thomas Linder Puls
PDC
Eftychios
Posts: 14
Joined: 19 Feb 2014 10:37

Unread post by Eftychios »

Thank you very much for your kind help ... you were very helpful
Post Reply