Page 1 of 1

Syntax Question

Posted: Tue Feb 23, 2016 8:46 pm
by BobFBurns
Hi All
I am a retired database application software developer who started with Clipper 5 many years ago and now dividing my time between software and hardware development. I am working on an Engineers Workbench and noted what appears to be an unusual behaviour in HMG3.4.2 so perhaps someone can clarify please. If I use the following button code in my program the program will compile with no errors and produce an executable but the button code will not work. If I replace the missing semicolon on line 3 then all is well and it works correctly. Is this what I should expect?
@ 140, 20 Button BtnCalculate;
Caption 'Calculate' ;
picture '' // missing semicolon!
Action (Bias_Calc())
Many thanks for an excellent product and I am just getting to grips with the debugger.
Bob

Re: Syntax Question

Posted: Tue Feb 23, 2016 9:08 pm
by esgici
BobFBurns wrote:Hi All
I am a retired database application software developer who started with Clipper 5 many years ago and now dividing my time between software and hardware development. I am working on an Engineers Workbench and noted what appears to be an unusual behaviour in HMG3.4.2 so perhaps someone can clarify please. If I use the following button code in my program the program will compile with no errors and produce an executable but the button code will not work. If I replace the missing semicolon on line 3 then all is well and it works correctly. Is this what I should expect?

Code: Select all

      @ 140, 20 Button BtnCalculate;
               Caption 'Calculate' ;
               picture ''   // missing semicolon!
               Action (Bias_Calc())
Many thanks for an excellent product and I am just getting to grips with the debugger.
Bob
Hi Bob

You are welcome wonderful world of HMG; salutes from Turkiye :D

Definitely you need add semicolon to the point you had indicated ( end of "picture..." line).

In that case semicolon means "this statement not terminated at this point, it will be continued with next line."

Otherwise (lack of semicolon) the next line (begin with "Action()") considered as a separate line, not bound to the previous line (statement begin with @... BUTTON).

In this case this isn't a syntax error, because we have a function named Action()!

I hope that this will be helpful to you :)

Happy HMG'ing :D

Re: Syntax Question

Posted: Tue Feb 23, 2016 11:40 pm
by danielmaximiliano
Hi Bob / Hola Bob

You are welcome from Buenos Aires Argentina :D
Sea uds bienvenido , saludos desde Buenos Aires Argentina

Re: Syntax Question

Posted: Wed Feb 24, 2016 8:43 am
by serge_girard
Hi Bob,

Welcome from Belgium!
I guess you problem is now solved?

Serge

Re: Syntax Question

Posted: Wed Feb 24, 2016 2:27 pm
by BobFBurns
Hi All
Thank you for the reply and support. I now know what to look for when it does not work.
Best wishes
Bob