REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 18-Feb-2009 Edit History  

REBOL 3 Concepts: Scripts: Running Scripts

Pending Revision

This document was written for R2 and has yet to be revised for R3.

There are two ways to run a script: as the initial script when the REBOL interpreter is started, or from the do function.

To run a script when starting the interpreter, provide the script name on the command line following the REBOL program name:

rebol script.r

As soon as the interpreter initializes, the script is evaluated.

From the do function, provide the script file name or URL as an argument. The file is loaded into the interpreter and evaluated:

do %script.r

do http://www.rebol.com/script.r

The do function returns the result of the script when it finishes evaluation.

Note that the script file must include a valid REBOL header.


  TOC < Back Next > REBOL.com - WIP Wiki Feedback Admin