NAME

veda-run-ilx - Run a SKILL/SKILL++ script from the command-line

SYNOPSIS

veda run-ilx script [script-arg]...
veda-run-ilx script [script-arg]...

DESCRIPTION

Runs a SKILL/SKILL++ script in skill, dbAccess, virtuoso -nograph or virtuoso, depending on its requirements.

Scripts are ordinary SKILL files, preceded by a specially-formatted comment header, e.g.:

#!/usr/bin/env veda-run-ilx
# @language skill
# @requires testing
printf("Hello, World!\n")

In the above,

In addition to the installed Veda packages, a number of implementation pseudo-packages are recognized, and cause the selection of an interpreter with the required features. E.g., @requires db triggers evaluation in dbAccess, which is the "minimal" interpreter exposing the Cadence db* API. Here is the list of recognized pseudo-packages and their corresponding minimal interpreter:

The default interpreter, chosen in the absence of a request for any implementation package, is the bare-bones skill interpreter.

Please see VEDA_SKILL_BIN and VEDA_*_BIN in veda help for more information on how interpreters are located.

The run-ilx command defines one globally available, no-arguments function, VedaRunScriptArgs, which can be used to query the [script-arg]... passed on the command-line:

(VedaRunScriptArgs)

The VedaRun* namespace prefix is reserved for future extensions.

cf. EXAMPLES section below.

EXAMPLES

Given the following hello.ilx file:

#!/usr/bin/env veda-run-ilx
# @language scheme

;; Defining a "main" function is considered good style.
(defun Hello (args)
  (let ((who (if args
                 (buildString args ", ")
                 "World")))
    (printf "Hello, %s!\n" who)))

;; Go.
(Hello (VedaRunScriptArgs))

one can do:

$ chmod 755 hello.ilx
$ ./hello.ilx
Hello, World!
$ ./hello.ilx Coyote
Hello, Coyote!
$ ./hello.ilx "Wile E. Coyote" "Road Runner"
Hello, Wile E. Coyote, Road Runner!

SEE ALSO

Crosstwine Veda on the Web