Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Provisional API: This reference documents current compiler behavior. Compatibility is not yet promised.

src/main.x

X2c command dispatch.

Functions

FunctionSummary
mainInitializes x2c and dispatches one command from argv.

Functions

main

int main(int argc, char **argv)

Initializes x2c and dispatches one command from argv. argv[0] locates the installation. The process status is zero for a successful translation or build, one for compiler or tool failure, and the executed program’s status for run. Help and version exit with zero, while invalid CLI and preflight input exit with status two. An external command replaces this process and returns its own status.

Source: src/main.x:140