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!!!
#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
I have very little knowlege on macro. So, can you please help me to understand the behavior
sudip
Try other functions ( SIN, TAN ) - the result is the same.
I guess this is not macro related behaviour, this is the dynamic linking factor, where only the functions spotted in the code are included in the exe file. As esgici suggested, you have to explicity inform the linker, which functons haven't to be omitted.