Hello Guest it is April 25, 2024, 11:32:59 AM

Author Topic: MACH3 Locks up in WHILE (IsMoving()) loop  (Read 19000 times)

0 Members and 1 Guest are viewing this topic.

Offline snark

*
  •  15 15
    • View Profile
Re: MACH3 Locks up in WHILE (IsMoving()) loop
« Reply #10 on: January 01, 2012, 10:06:38 PM »
I have a question, is the use of the parenthesis  invalid or redundant? (IsMoving()) <-> IsMoving()

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: MACH3 Locks up in WHILE (IsMoving()) loop
« Reply #11 on: January 02, 2012, 05:19:06 AM »
I have a question, is the use of the parenthesis  invalid or redundant? (IsMoving()) <-> IsMoving()
It's a moot point - I'm not aware of the formal syntax diagrams being published for CB so I can only assume that CB's syntax is similar to other dialects of BASIC. With that assumption, it shouldn't actually matter because if the parentheses arn't formally part of the while syntax (as they are in C for example) then they would be parsed as a part of the expression syntax (in most BASIC dialects an expression can have an arbitrary number of balanced parentheses around it)

This is not to be confused with the fact that some dialects of BASIC have a peculiar syntax with regards to actual parameter lists. Function calls use parenthesis whereas procedure calls don't UNLESS preceded by the CALL keyword. CB doesn't appear to care!

Meanwhile...

I don't see the syntax error nor does the editor. I see the funny looking ' but can't explane it.
The funny looking ` as you put it IS the syntax error. The comment char in CB is '. You can ignore it if you like but I find it interesting that this is the second time in a week where W7 has been reported to have failed to catch a syntax error that XP succeeds in catching. If an interpreter fails to catch a syntax error then personally I would not trust it after that. Your problem may have more to do with this anomaly than you might think.

Offline snark

*
  •  15 15
    • View Profile
Re: MACH3 Locks up in WHILE (IsMoving()) loop
« Reply #12 on: January 02, 2012, 05:36:37 PM »
The Macro in the Macro Library has ' for comment. I am unable to find the displayed charactor on my keyboard and I am sure that I struck the ' key when I entered the code. Is there a way to display the Hex  value of the charactor in the listing. I would expect a different responce when attempting to run, if the comment hadn't been recognized and the editor were to try to execute the comment as code.

Point being: I think the problem is with the web browser and not the editor. Otherwise I can't explane it. 'C  'D  'c  ' d