Subj : JS_ValueToString and STRING_TO_JSVAL To : netscape.public.mozilla.jseng From : Weiyang Zhou Date : Thu Aug 11 2005 11:37 pm In js.c of the example JS shell, there is a function called Load. It has the following code: static JSBool Load(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { ..... for (i = 0; i < argc; i++) { str = JS_ValueToString(cx, argv[i]); if (!str) return JS_FALSE; argv[i] = STRING_TO_JSVAL(str); filename = JS_GetStringBytes(str); .... What's the purpose of converting argv[i] to str, the assign str back to argv[i]? In the end, argv[i] remain the same. Thanks. Weiyang .