Subj : Re: evaluating a script in C++ Windows application To : netscape.public.mozilla.jseng From : Shanti Rao Date : Mon Jan 17 2005 03:04 pm > Hi everybody and happy new year ! > > here is my question about c++ and javascript: > > when i create a script with the 'return;' statement, > compilation fails in my C++ application. > here is the following script : > .... > char *aScript = "var i = '.com'; var j = 'http://www.google.'+i; return;"; > JSScript *my_jsScript = JS_CompileScript(.....,aScript,....); > if (!my_Script) { > my app goes here > } > > if don't insert any 'return;' statement but 'j.toString()' : compilation > and execute are ok. > but i need to insert a 'return;' statement. > I think you're wanting something like function main() { var i = '.com'; var j = 'http://www.google.'+i; return; } main() .