You do not specifically output anything - you just call a function
that returns a string. try changing:
return 'line1' + "\n" + 'line2';
to
print('line1' + "\n" + 'line2');
btw, this question would be more suited for the v8-users mailing list,
this list is for v8 development (i.e., changes, bugs and discussions
about the v8 code base), not about v8 usage.
Cheers,
Rico
On Thu, Jan 13, 2011 at 10:37 PM, <[email protected]> wrote:
> Hello,
>
> i am new to c++ and play with the v8 engine.
>
> is there any Reason why this Testscript:
>
> function helloWorld()
> {
> return 'line1' + "\n" + 'line2';
> }
>
> helloWorld();
> helloWorld();
>
> ignore the second HelloWorld function call?? output is only "line1
> line2" and not "line1 line2 line1 line2".
>
> i used a very easy setup, just compile and run the script.
>
> thanks for help =)
>
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
>
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev