Syntax Question

Moderator: Rathinagiri

Post Reply
BobFBurns
Posts: 16
Joined: Fri Apr 05, 2013 8:45 am
DBs Used: DBF, ACCDB
Location: 25Km South of London
Contact:

Syntax Question

Post 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
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Syntax Question

Post 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
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Syntax Question

Post by danielmaximiliano »

Hi Bob / Hola Bob

You are welcome from Buenos Aires Argentina :D
Sea uds bienvenido , saludos desde Buenos Aires Argentina
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
serge_girard
Posts: 3162
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Syntax Question

Post by serge_girard »

Hi Bob,

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

Serge
There's nothing you can do that can't be done...
BobFBurns
Posts: 16
Joined: Fri Apr 05, 2013 8:45 am
DBs Used: DBF, ACCDB
Location: 25Km South of London
Contact:

Re: Syntax Question

Post 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
Post Reply