jshello
an example compileAndGo script using JavaScript

Wrap JavaScript code in a compileAndGo script, as in the example below. Once-only compilation is automatic; the executable file is cached; source and invocation script are both in the one file.

Example:

1 Z% ./jshello 'folks of World'
Hello, folks of World!
2 Z% 

Here’s the cgo script.

#!/usr/bin/env compileAndGo
language = javascript
compiler = jsc
compileAndGo

// Or you can use java.lang.System.out.println()
print(
     "Hello, "
   + (arguments.length > 0 ? arguments[0] : "World")
   + "!")

(“Hello, folks of World!” is the Goon Show variant of “Hello, world!”)


3

http://Yost.com/computers/compileAndGo/cgo.html - this page
2004-08-04 Created