jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Huntwork <...@huntwork.net>
Subject Re: accessing local variables
Date Mon, 12 Jul 2004 20:59:24 GMT
uh, yeah, i did mean fields.  sorry, i don't know what i was thinking.

spamart@uark.edu 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: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


Mime
View raw message