Page 1 of 1

[6.20] Macro problem?

Posted: Tue Mar 18, 2025 4:34 pm
by Michael Vogel
The editor does execute this code without an error:

Code: Select all

Macro SetMessage(messagetext,hey=0)
	Debug messagetext
EndMacro

Debug "---"
SetMessage(StringField("A.B.C",1,".")
Debug "---"
SetMessage(StringField("A.B.C",1,"."))
Debug "---"

Re: [6.20] Macro problem?

Posted: Tue Mar 18, 2025 6:03 pm
by Little John
Confirmed with PB 6.20 (x64) on Windows. That's a bug.

The following simplified code also does not raise an error here:

Code: Select all

Macro SetMessage(messagetext, hey=0)
   Debug messagetext
EndMacro

SetMessage("A"
SetMessage("A")

Re: [6.20] Macro problem?

Posted: Tue Mar 18, 2025 7:31 pm
by Kiffi
Little John wrote: Tue Mar 18, 2025 6:03 pmConfirmed with PB 6.20 (x64) on Windows.
With 6.21 Beta 1 (x64) on Windows I get a "Syntax error".

Image

Re: [6.20] Macro problem?

Posted: Tue Mar 18, 2025 9:02 pm
by Little John
Kiffi wrote: Tue Mar 18, 2025 7:31 pm With 6.21 Beta 1 (x64) on Windows I get a "Syntax error".
:thumbsup:

Re: [6.20] Macro problem?

Posted: Wed Mar 19, 2025 11:39 am
by User_Russian
This is a mistake in the code. A bracket is missing.

Code: Select all

Macro SetMessage(messagetext,hey=0)
	Debug messagetext
EndMacro

Debug "---"
SetMessage(StringField("A.B.C",1,"."))
Debug "---"
SetMessage(StringField("A.B.C",1,"."))
Debug "---"

Re: [6.20] Macro problem?

Posted: Wed Mar 19, 2025 11:45 am
by Kiffi
User_Russian wrote: Wed Mar 19, 2025 11:39 amThis is a mistake in the code. A bracket is missing.
That is correct. However, the issue here is that PB 6.20 accepts the faulty code, while PB 6.21 correctly displays a syntax error.