Function parameters are also automatically temp. variables and can be referenced as such.
Once you declare a temp. variable you can reference it without the prefix and it will not be a global. Because of this for most functions I prefer to declare all my temp.variable = 0; at the beginning of the function.
Ex:
PHP Code:
public function save(filename) {
temp.output = 0;
temp.i = 0;
temp.e = 0;
temp.keys = this.getdynamicvarnames();
temp.vars = 0;
for (i = 0; i < keys.size(); i ++) {
if (this.(@ keys[i]).type() != -1) {
continue;
}
output.add("[" @ keys[i] @ "]");
vars = this.(@ keys[i]).getdynamicvarnames();
for (e = 0; e < vars.size(); e ++) {
if (this.(@ keys[i]).(@ vars[e]) != null) {
output.add(vars[e] @ "=" @ this.(@ keys[i]).(@ vars[e]));
}
}
}
output.savelines(filename, 0);
}