Subj : Re: evaluating a script in C++ Windows application To : =?ISO-8859-1?Q?B=E9atrice_Philippe?= From : Brendan Eich Date : Mon Jan 17 2005 12:32 pm Béatrice Philippe wrote: > but i need to insert a 'return;' statement. Why? return is not allowed outside of functions. If you use JS_SetErrorReporter, your error reporter would tell you that. You could wrap the top-level script in a do{...}while(0) and use break instead of return in the ... part. /be .