Page 1 of 1
Initialize variables
Posted: Sat Oct 07, 2017 12:03 pm
by rbytes
It would speed coding if SPL would initialize undefined numeric variables to 0 and string variables to "" on first use, the way you handled them in SB, rather than terminating the program with an error.
Re: Initialize variables
Posted: Sat Oct 07, 2017 5:27 pm
by Mr. Kibernetik
This blocks incorrect objects from usage.
For example, if you have an object "aaa" and then misspell it as "aab" so you will get an error instead of silent usage using 0 value.
Also, SPL does not know if it is a text or a numeric object to initialize it to 0 or "".
Re: Initialize variables
Posted: Sat Oct 07, 2017 6:59 pm
by rbytes
I can see the value of that. Maybe it would have been better to suggest introduction of error trapping so the program can be made recoverable.