uh, yeah, i did mean fields.  sorry, i don't know what i was thinking.

[EMAIL PROTECTED] wrote:

Hi Andrew,
Thank you for your mail. Actually I wanted to implement nested functions. Say if I 
have the following declaration.

function f(){
 var x;
  function g()
  {
   var y
   return (x + y );
  }
  g();
}

print( f() );

I translate the same program into
class abc{

publc static void global()
{
  print( f() );

}
public static void f()
{
 var x;
 f$g();
}

public static int f$g()
{
 var y;
 return ( x + y );

}

public static void main( String args[]){
 global();
}

}// end of class

What do u mean by global variables. Do u mean  fields in a class ?





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to