[6.20] Macro problem?

Working on new editor enhancements?
User avatar
Michael Vogel
Addict
Addict
Posts: 2806
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

[6.20] Macro problem?

Post 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 "---"
Little John
Addict
Addict
Posts: 4787
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: [6.20] Macro problem?

Post 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")
User avatar
Kiffi
Addict
Addict
Posts: 1500
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: [6.20] Macro problem?

Post 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
Hygge
Little John
Addict
Addict
Posts: 4787
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: [6.20] Macro problem?

Post 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:
User_Russian
Addict
Addict
Posts: 1528
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: [6.20] Macro problem?

Post 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 "---"
User avatar
Kiffi
Addict
Addict
Posts: 1500
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: [6.20] Macro problem?

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