Subj : Re: JS_CallFunction To : Adrian M From : Brendan Eich Date : Thu Jul 15 2004 01:41 pm Adrian M wrote: > source = "function myfunc() { return ( 10 ) }"; > f = JS_CompileFunction( cx, globalObj, "myfunc", 0, 0, source, > strlen( source ), "inlined code", lineno ); You have just compiled a function that contains a function named myfunc, and no other statement -- not even a return. Remember that the string you pass to JS_Compile*Function* is the *body* of the function. /be .