In the code below:
the final print statement isn't hit because sym() blows up because I've used a var called sym ealier on.
Not sure if this is intended functionality or not. If it is intended functionality then it would be useful if the pre-compiler or syntax checker could make sure that certain keywords weren't used in a context which they shouldn't be used such as here. Or perhaps generate a meaningful message to help track down such erroneous coding.
PHP Code:
function preMain() {
_init = true;
}
var _init = true;
function main() {
if(_init) {
// If sym is renamed sym1 then we hit the final debug()
// function at the bottom
var sym = getSymbol().split(" ");
if(sym[0] != "ES") {
debugPrintln("symbol is ES");
}
else {
debugPrintln("symbol is not ES");
}
_init = false;
}
debugPrintln("before test function");
var ff = close(0, sym("nq #f"));
debugPrintln("after test function");
}
Not sure if this is intended functionality or not. If it is intended functionality then it would be useful if the pre-compiler or syntax checker could make sure that certain keywords weren't used in a context which they shouldn't be used such as here. Or perhaps generate a meaningful message to help track down such erroneous coding.