You are casting the function to the var.  There's probably another 
way to do this, but this will work.

if (someFunction(data)){
   Result = true;
} else {
   Result = false;
)

--- In [email protected], "robbieshere" <[EMAIL PROTECTED]> 
wrote:
>
> Hi. I have the following lines in an ActionScript code:
> 
> private var Result:Boolean;
> result = someFunction(data);
> 
> if (Result){
>    etc..
> }
> 
> ..the function "someFunction()" returns a Boolean value. This code 
> works fine, except when I perform a step trace, I notice that in 
the 
> if statement, when it checks the value of Result, jumps to the 
line: 
> result=someFunction(data)  ..and goes on to evaluate the function! 
> Therefore I am wondering if it always evaluates someFunction(data) 
> everytime I use the Result variable in my code.
> 
> If so, is there a way I can just extract the value so that I don't 
> have to keep running the function? (say the function is a bunch of 
> nested for-statements...that would take a lot of time to compute!)
> 
> Thanks for the help.
> Rob Graham
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to