Page 1 of 1

@IF 0 Dim a[10] @ENDIF

Posted: Wed Sep 02, 2020 8:42 pm
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


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

Posted: Sat Sep 05, 2020 5:04 pm
by airsoftsoftwair
Yes, clearly a bug. Will be fixed.

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

Posted: Sat Sep 05, 2020 6:11 pm
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