XLISP system

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference

# system

Type: | - | function (subr)
Source: | - | sys/unix/osstuff.c, sys/mac/macfun.c, sys/win/msvc/winfun.c

## Syntax

(system command)
  command - the OS command string to be executed
  returns - T if the command was successful, the error code otherwise

## Description

The 'system' function will send the 'command' string to the underlying operating system for execution. After execution of the 'command', the 'system' function will return a T result if the 'command' was successful. If the 'command' was not successful, the numeric error code will be returned. Any output from the 'command' execution will not be put in the transcript file.

Note: In Nyquist, this function is only defined to work on Unix systems [including Linux and Mac OS X]. On Windows systems, NIL is returned.

## Examples

    (system "ls")     ; do a directory listing

Back to Top

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference