SET (and SETARRAY) Types SET and SETARRAY now allow you to specify the type of variable to create. Variable types allow you to better organize your batch variables and to prevent invalid input. If you try to set a variable to an incompatible value, TCC will return an error. The possible types are: - int (or 1)The variable can only contain 0-9
- dec (or 2)The variable can only contain 0-9, the decimal character, and the thousands separator
- hex (or 3)The variable can only contain 0-9 and A-F
- bool (or 4)The variable can only contain 0 or 1
- alpha (or 5)The variable can only contain A-Z and a-z
- alnum (or 6)The variable can only contain A-Z, a-z, and 0-9
- regex (or 7)The variable must match the specified regular expression
For example: SET /T:1 intvar=123 SET intvar=abc TCC: (SYS) Data supplied is of wrong type. "intvar=abc"
|