instantfpc(1)

NAME
instantfpc - The Free Pascal Interpreter.

SYNOPSIS
instantfpc [-h] [-v] [compiler options] <source file> [program arguments]

DESCRIPTION
instantfpc is a Pascal code interpreter program. It compiles source and runs the generated program. It allows Pascal source code to be treated like a script, by placing #!/usr/bin/env instantfpc as the 'shebang' line at the top of the Pascal source file. To avoid recompiling source when it hasn't changed, instantfpc keeps a cache (see --set-cache option). When instantfpc is run, the source is compared with the cache. If the cached source is not valid, then source is copied to the cache with the shebang line commented out, and the cached source is compiled. If compilation fails, the fpc output is written to stdout and an exit code of 1 is returned. If compilation is successful, the program is executed. If program arguments were given, they are passed to the compiled program when it is run. If the compiler options contains -B, the program is always recompiled. If the environment variable INSTANTFPCOPTIONS is set, it is passed to the compiler as the first argument(s).

NOTE
instantfpc is also installed as ifpc for compatibility with older versions of Free Pascal.

USAGE
instantfpc takes the following arguments:

-h  Prints this help message and exit.

-v  Prints version and exit.

--get-cache
    Prints current cache directory and exit.

--set-cache=<path to cache>
    Set the cache to be used. Otherwise uses environment variable INSTANTFPCCACHE if set, or $HOME/.cache/instantfpc/ otherwise.

--compiler=<path to compiler>
    Normally fpc is searched in PATH and used as compiler.

--skip-run
    Do not execute the program. Useful to test if script compiles.

-B  Always recompile.

SEE ALSO

    fpc(1)