Allow single-line if statements without EndIf

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Piero
Addict
Addict
Posts: 923
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: Allow single-line if statements without EndIf

Post by Piero »

BarryG wrote: Tue Feb 18, 2025 9:56 am

Code: Select all

Macro Do (code)
  : code : EndIf
EndMacro

Procedure MySub()
  Debug "a=1"
EndProcedure

a=1

If a : Do(MySub())

Code: Select all

If a Do(MySub())
;)
Post Reply