Closed
Bug 352047
Opened 18 years ago
Closed 9 years ago
Javascript example for Windows need double quotes to work, not single quotes
Categories
(Developer Documentation Graveyard :: Mozilla Platform, defect)
Developer Documentation Graveyard
Mozilla Platform
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jlpoole56, Assigned: sheppy)
References
()
Details
(Whiteboard: u=mozdev p=0 c=Platform)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
The example, though working in Linux, does not work in Windows because of the single quotes:
G:\ws\rhino\examples>ver
Microsoft Windows XP [Version 5.1.2600]
G:\ws\rhino\examples>java RunScript "Math.cos(Math.PI)"
-1
G:\ws\rhino\examples>java RunScript 'function f(x){return x+1} f(7)'
functionf(x){returnx+1}f(7)
G:\ws\rhino\examples>java RunScript "function f(x){return x+1} f(7)"
8
G:\ws\rhino\examples>ver
Microsoft Windows XP [Version 5.1.2600]
G:\ws\rhino\examples>java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)
G:\ws\rhino\examples>
Reproducible: Always
Steps to Reproduce:
1. Open DOS console in directory of RunScript.class
2. Set CLASSAPTH to rhino class tree and current dir, "e.g. set CLASSPATH=../build/classes;."
3. run: java RunScript 'function f(x){return x+1} f(7)'
4. run: java RunScript "function f(x){return x+1} f(7)"
Actual Results:
single quotes:
G:\ws\rhino\examples>ver
Microsoft Windows XP [Version 5.1.2600]
G:\ws\rhino\examples>java RunScript "Math.cos(Math.PI)"
-1
G:\ws\rhino\examples>java RunScript 'function f(x){return x+1} f(7)'
functionf(x){returnx+1}f(7)
G:\ws\rhino\examples>single quotes:
G:\ws\rhino\examples>ver
Microsoft Windows XP [Version 5.1.2600]
G:\ws\rhino\examples>java RunScript "Math.cos(Math.PI)"
-1
G:\ws\rhino\examples>java RunScript 'function f(x){return x+1} f(7)'
functionf(x){returnx+1}f(7)
G:\ws\rhino\examples>java RunScript "function f(x){return x+1} f(7)"
8
8
Expected Results:
"8" should be output for: java RunScript "function f(x){return x+1} f(7)"
This is a documentation bug, and perhaps an oversight of the author about differences in DOS consoles vs. Linux.
[Sorry for the incorrect component assignment, I tried to find something that would associate this bug with the rhino project, but the online documentation within this bug filing process did not provide me the necessary information.]
Comment 1•18 years ago
|
||
*** Bug 352050 has been marked as a duplicate of this bug. ***
Updated•18 years ago
|
Severity: minor → normal
OS: Windows XP → All
Hardware: PC → All
Updated•16 years ago
|
Product: mozilla.org → Websites
Comment 2•16 years ago
|
||
The www.mozilla.org site should no longer host documentation. If there is still a need for this it should be added to MDC. Moving to Mozilla Developer Center product for discussion.
Component: www.mozilla.org → Documentation Requests
Product: Websites → Mozilla Developer Center
QA Contact: www-mozilla-org → doc-request
Version: other → unspecified
Comment 3•16 years ago
|
||
I've been slowly moving documents over to MDC, but haven't moved this one yet.
Updated•12 years ago
|
Component: Documentation Requests → Documentation
Comment 4•12 years ago
|
||
Automatically closing all bugs that have not been updated in a while. Please reopen if this is still important to you and has not yet been corrected.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Comment 5•12 years ago
|
||
Reopening for review by Sheppy.
Assignee: nobody → eshepherd
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
Updated•12 years ago
|
Component: Documentation → General
Product: Mozilla Developer Network → Developer Documentation
Assignee | ||
Updated•12 years ago
|
Whiteboard: u=mozdev p=0
Assignee | ||
Updated•12 years ago
|
Component: General → Mozilla Platform
Whiteboard: u=mozdev p=0 → u=mozdev p=0 c=Platform
Assignee | ||
Comment 6•12 years ago
|
||
I've done some fixes for this. Can someone check it out and see if this is done or if it needs more work?
https://developer.mozilla.org/en-US/docs/Rhino/Embedding_tutorial
Updated•9 years ago
|
Status: REOPENED → RESOLVED
Closed: 12 years ago → 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•