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

REBOL 3 Concepts: Scripts: File Suffix

Pending Revision

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


The convention

We typically append a .r suffix to script file names:


However, this convention is not mandatory. Any file suffix is valid:


As mentioned earlier a script can refer to:

So the REBOL interpreter will read any file and will scan its contents for a valid REBOL scripts: headers. If found, then the code (or data) that follows it will be processed as REBOL source.

R3 convention (pending)

We are considering changing the suffix for R3, in order to make it easy for an OS to identify the correct interpreter for the file.

File associations

Operating systems can associate a suffix with specific applications for actions like "open" and "edit".

For example, MS Windows does this via registry entries.

The REBOL install function provides a quick way to setup these default association between .r and REBOL. Doing so also requires that REBOL be located in a standard directory, so install also takes care of that.

Associating .r on other operating systems is not currently supported, but if you have the know-how and would like to see it supported, please contact us.

As a MIME type

REBOL source code has no official MIME type association (nor do most other interpreted language source formats.) MIME types are often used for web servers and browsers to identify a medium in order to provide the correct presentation and application association.

Unofficially we have used:


This media type can be justified because REBOL source is textual data and it's meaning is interpreted (not pre-compiled into binary). The data may be source code, but it may also be GUI code, a presentation, descriptions, databases, or various other datatypes. So, we place it in the same MIME class as XML and HTML

  TOC < Back Next > - WIP Wiki Feedback Admin