View Single Post
  #15  
Old 01-25-2008, 01:07 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
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.0;
  
temp.0;
  
temp.keys this.getdynamicvarnames();
  
temp.vars 0;
  
  for (
0keys.size(); ++) {
    if (
this.(@ keys[i]).type() != -1) {
      continue;
    }
    
output.add("[" keys[i] @ "]");
    
vars this.(@ keys[i]).getdynamicvarnames();
    for (
0vars.size(); ++) {
      if (
this.(@ keys[i]).(@ vars[e]) != null) {
        
output.add(vars[e] @ "=" this.(@ keys[i]).(@ vars[e]));
      }
    }
  }
  
output.savelines(filename0);

__________________
Reply With Quote