Auto-Declare

There is a mechanism in DXL called auto-declare, which means that the programmer need not specify the type of a variable. The interpreter deduces the type from the assignment statement.

This is a very dangerous feature, because if you make a mistake when typing a variable name, the interpreter will assume that a new variable is being used. Errors like this are extremely hard to find.

So, once you have mastered your first “Hello World” program in DXL, and before you attempt any real programming, you should turn off the interpreter’s auto-declare function by adding the line

XFLAGS_ &= ~AutoDeclare_

to the bottom of the file $DOORSHOME/lib/dxl/startup.dxl