NAME

oadl - OADL interpreter and desk calculator

SYNOPSIS

oadl [flags] [filenames] [args]

The [flags] are zero or more of:

-v
verbose - print stack trace on error
-b
break to system debugger on error
-g
generate debugging information
-m size
initial size of the heap (default 1MB)
-ah thresh
sets array heap-vs-malloc threshold
-n
print the count of executed instructions on exit
-t
generate instruction traces during execution
-calc
run the given filenames in calculator mode
-noinit
do not load the calculator oadlrc.oad file
-lLIB
loads libLIB.oax from the OADL library path
-Ldir
adds dir to the library search path
-Idir
adds dir to the include search path
-pf
set oadl::TypePromote to Float
-pl
set oadl::TypePromote to Long
-pd
set oadl::TypePromote to Double
--
puts remaining arguments into oadl::ArgVec

The [filenames] are zero or more source files (with a suffix of ".oad") or executable files (with a suffix of ".oax"). If no filenames are given, OADL will run in interactive desk calculator mode. The optional [args] are passed to the OADL main proc if OADL is not being run in interactive desk calculator mode.

DESCRIPTION

oadl is the OADL interpreter. It will compile-and-run an OADL program, or it can operate as an interactive desk calculator. In desk calculator mode, OADL declarations and programs may be entered and evaluated immediately. See oadlcalc for more information on the interactive desk calculator.

Full documentation of the OADL language may be found at http://rcunniff.com/OADL/oadl.html. Sample OADL test programs may be found at http://rcunniff.com/OADL/Tests/index.html and at http://rcunniff.com/OADL/ADV/index.html.

EXAMPLE

Compile-and-run example:

    bash $ cat hello.oad
    proc main()
    {
        "Hello, world!\n";
    }
    bash $ oadl hello.oad
    Hello, world!

Interactive desk calculator example:

    bash $ oadl
    OADL calculator. Type #help for help, #quit to quit.
        a = 17
        a * 2
    34

        proc fact(a) {
            return (a < 1) ? 1 : (a * fact(a-1));
        }
        fact(4)
    24

ENVIRONMENT

The following environment variables are used by oadl:

OADL_INC
Semicolon-separated list of directories to be searched for #include files
OADL_SYS
Semicolon-separated list of directories to be searched for OADL system dynamic link libraries
OADL_LIB
Semicolon-separated list of directories to be searched for .oax files specified via the -l option
PATH
System path; used to find and restart OADL if requested
HOME
User's home directory; used to find the OADL startup file .oadlrc.oad

SEE ALSO

oadlcalc
oadledit
oadlc
oadlx
oadldb
oadldump