To run a top-level program, either:
Use the plt-r6rs executable, supplying the file that contains the program on the command line:
Additional command-line arguments are propagated as command-line arguments to the program (accessed via command-line).
To compile the file to bytecode (to speed future runs of the program), use plt-r6rs with the --compile flag:
plt-r6rs --compile ‹program-file›
The bytecode file is written in a "compiled" sub-directory next to ‹program-file›.
For example, if "hi.scm" contains
Prefix the program with #lang r6rs from the PLT Scheme perspective. Such files can be run like any other PLT Scheme module, such as using mzscheme:, which counts as a comment from the R6RS perspective, but is a synonym for
or using DrScheme with the Module language. The file can also be compiled to bytecode using mzc:
For example, if "hi.ss" contains
prints “hello.” Similarly, opening "hi.ss" in DrScheme and clicking Run prints “hello” within the DrScheme interactions window.