setting variable to zero

in a I_xx.xml file a varable is used which has no value (nothing ; no nil or no “0”) the file stops

is there a way to bypass this i.e.
all un indentified values in I_xx.xml and which have not been declared by the command “SET” are set to nil or “0”

pls advise

rgds
Huib

The program will not stop because you have uninitialized values.
All variables start out uninitialized.

There is an implied contract when you call a function. The function agrees to do it’s job when you supply it with all the required arguments, of the correct type, and in the specified order.

Often passing uninitialized values violates that contract.
It’s your job as a programmer to adhere to all of the terms and conditions of a function’s contract … or find another function!

If i have the function “var = var + 1” and the value “var” has no value the program stops
And that i want to prevent

So is there a instruction to set all empty values to zero in case of error
Rgds
Huib

In this case the contract is with the + operator which requires all arguments be a number.
Without you doing initialization it’s ambiguous what the correct answer is.
In your example:
var = var + 1
Some might think that with an un-initialized variable the result should be 1.
Others would argue the result should be un-initialized.

You should code this as:
if (var) then
var = var + 1
else
var = 1
end

So is there a instruction to set all empty values to zero in case of error
No and there never will be. If you were going to operate on strings the variables would need to be initialized to empty strings .... This is your responsibility as a programmer to do the appropriate initialization.

Ok lesson learned