Closed Bug 582999 Opened 14 years ago Closed 14 years ago

putstr function for JS shell

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dherman, Assigned: dherman)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

AFACT, it's not possible to print output without a newline in the JS shell. To write a REPL for Narcissus, I'd like to be able to print a user prompt without a newline. I'll attach a simple patch for a puts(str) function. Dave
True Unix nerds recall that unlike fputs(3S), puts appends a newline. So maybe the name should be something different, e.g. putstr. /be
Blocks: 583001
Summary: puts function for JS shell → putstr function for JS shell
Attached patch PutStr function for shell (deleted) — Splinter Review
Attachment #461280 - Flags: review?(brendan)
Comment on attachment 461280 [details] [diff] [review] PutStr function for shell Stealing Brendan's review. Looks trivial. Code mostly duplicated from Print.
Attachment #461280 - Flags: review?(brendan) → review+
We usually test argc != 0, not argc >= 1. Uber-nit. /be
Whiteboard: fixed-in-tracemonkey
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: