Some times, the one result of a function is not enough, cay we use the
arguments to get back values from them?

 

internal function getXY(x:int,y:int):void{

  x=10;y=20;

}

 

internal function test():void{

  var x:int; var y:int;

  getXY(x,y);

  trace("x: "+x.toString()+" y: "+y.toString());  // here I get "x: 0 y: 0",
I want to get "x: 10 y: 20"

}

 

For instance, in c the getXY should be like this:

 

internal function getXY(int* x, int* y):void{

  x=10;y=20;

}

 

dennis

 

Reply via email to