@IF 0 Dim a[10] @ENDIF

Report any Hollywood bugs here
Post Reply
djg
Posts: 16
Joined: Wed Feb 12, 2020 10:37 pm

@IF 0 Dim a[10] @ENDIF

Post by djg »

I was disabling some code using an @IF @ENDIF pair and Hollywood could not find the @ENDIF.
But it only happened if the first statement following the @IF statement was a Dim statement and the condition was false.

Surely this is a bug? Maybe this has been mentioned before, but I could not find that.

Code: Select all

@IF 1
	Print("a")
	Dim a[10]
@ENDIF

@IF 0
	Print("b")
	Dim b[10]
@ENDIF

@IF 1
	Dim c[10]
	Print("c")
@ENDIF

; computer says no @endif

@IF 0
	Dim d[10]
	Print("d")
@ENDIF

User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: @IF 0 Dim a[10] @ENDIF

Post by airsoftsoftwair »

Yes, clearly a bug. Will be fixed.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: @IF 0 Dim a[10] @ENDIF

Post by airsoftsoftwair »

Code: Select all

- Fix: The Dim and DimStr statements broke the @IF, @ELSEIF, and @ELSE preprocessor commands when used
  directly after a preprocessor command whose condition was FALSE 
Post Reply