print now returns JSValue, added space between args when printing

git-svn-id: svn://10.0.0.236/trunk@68796 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
beard%netscape.com
2000-05-09 03:56:56 +00:00
parent d5964ffccd
commit ec4a108471
2 changed files with 16 additions and 8 deletions

View File

@@ -384,12 +384,16 @@ static float64 testFunctionCall(World &world, float64 n)
return result.f64;
}
JSValue *print(const JSValues &argv)
JSValue print(const JSValues &argv)
{
for (int i = 0; i < argv.size(); i++)
stdOut << argv[i];
size_t n = argv.size();
if (n > 0) {
stdOut << argv[0];
for (size_t i = 1; i < n; ++i)
stdOut << ' ' << argv[i];
}
stdOut << "\n";
return new JSValue(); // undefined???
return kUndefinedValue;
}
static void testPrint(World &world)