Ceiling() function with Macro
Posted: Mon Mar 29, 2010 3:05 pm
Hello All,
I found some problem with using CEILING() function with Macro. Interestingly I found it works, only if I call CEILING() function directly as a dummy function!!!
I have very little knowlege on macro. So, can you please help me to understand the behavior 
Thanks in advance.
With best regards.
Sudip
I found some problem with using CEILING() function with Macro. Interestingly I found it works, only if I call CEILING() function directly as a dummy function!!!
Code: Select all
#include <hmg.ch>
Function Main
DEFINE WINDOW main at 0, 0 width 450 height 300 TITLE "Macro Test with CEILING() function!!!" MAIN
DEFINE TEXTBOX Text_1
ROW 50
COL 80
INPUTMASK "9999.999"
FORMAT Nil
NUMERIC .T.
END TEXTBOX
DEFINE BUTTON Button_1
ROW 50
COL 300
ACTION test1()
CAPTION "Gives Error!!!"
END BUTTON
END WINDOW
Main.Text_1.value := 100.001
Main.Center
Main.Activate
Return
function Test1()
local x := "CEILING("+str(main.text_1.value)+")"
// dummy
//CEILING(1) // but runs fine when you clear the comments of this line before ceiling()!!!
msgbox(str(&x))
return nil
Thanks in advance.
With best regards.
Sudip