Macro does not properly recognize ";" as a comment line
-
Given two small sections from a macro file
; this is a macro file if var.bedTemp < 30 set global.soakTime = 180 elif var.bedTemp < 50
This executes ok
; this is a macro file if var.bedTemp < 30 set global.soakTime = 180 ; test elif var.bedTemp < 50
This throws an error of "elif" does not follow an "if"
The macro seems to recognize that "test" is a comment since it does not complain about "test", It seems that whatever mechanism is used to parse the macro still thinks the comment line is a program line in the macro and it throws an error.
If I put the comment after a valid program line (on the same line), everything is fineWhile I do not have a direct example, the following executes and displays the message when it shouldn't:
; M117 "test"As always, maybe I just don't know what I am doing and there is a logical reason for this behaviour ....
-
@jens55 which RRF version are you using? Are you running in SBC mode or standalone mode?
-
@dc42, standalone
Board: Duet 2 WiFi (2WiFi)
Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.4.0 (2022-03-15)
Duet WiFi Server Version: 1.26 -
@jens55 I have tested your file. It works if I indent the "; test" comment. So it seems that the un-indented comment line is causing the parser to consider that the 'if' block has finished.
I will log this as a bug, however as there is a simple workaround (indent comments to the same level as the surrounding commands) we won't treat fixing it as a priority.
Thanks for reporting this.
-