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

REBOL 3 Concepts: Scripts: Script Arguments

Pending Revision

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

When a script is evaluated, it has access to information about itself. This is found in the system/script object. The object contains the fields listed in [bad-link:concepts/object.txt] Fields for system/script.

HeaderThe header object of the script. This can be used to access the script's title, author, version, date, and other fields.
ParentIf the script was evaluated from another script, this is the system/script object for the parent script.
PathThe file directory path or URL to the script being evaluated.
ArgsThe arguments to the script. These are passed from the operating system command line or from the do function that was used to evaluate the script.

Examples of using the script object are:

print system/script/title

print system/script/header/date

do system/script/args

do system/script/path/script.r

The last example evaluates a script called script.r in the same directory as the script that is currently running.

  TOC < Back Next > - WIP Wiki Feedback Admin