Here's the source file:
.DEFINE TESTVAR 1
:START
SET A, 1
.IFDEF TESTVAR
SET B, 3
.ENDIF
SET PC, START
Attempting to assemble with dtasm gives this:
error: free occuring .ENDIF without a matching .IF near line 7 of 'definetest.dasm16'
assembler: error occurred.