Docs Blog Get-it

Quick Summary Presentation of Rebol

Quick Demo

A few demos of Rebol/View to engage your imagination.

Brain Prep

Roots of Rebol

Background influences that lead to Rebol, early versions, current versions:


Main Concepts

Literal Values

123      - integer
1.23     - decimal (floating point)
1,23     - decimal, alternate
$1.23    - high precision (currency)  - tuple up to 6 places (versions, colors, IP address)
50x320   - pair for X/Y points
10:23:00 - time (hours, minutes, seconds)
5-4-2015 - date (day, month, year)
2015-4-5 - date (year, month, day)
"abc"    - string (UTF-8)
{abc}    - multi-line string (UTF-8)
<abc>    - markup tag
%abc     - file, directory, path
abc://   - URL/URI - email address
#1A2B    - hex integer
#{abc0}  - binary hex (byte string)


print read
print 10:30 + 2:11
print now - 5-may-1965
print 5-may-1965 + 100
write %system.reb mold system
print size? %system.reb
help system (various examples)

Words Formats

Words are used for variables, symbols, selectors, and literal values:

abc  - a variable in code, or a symbol in data
abc: - define a variable (called "set-word")
:abc - get value of variable (called "get-word")
'abc - the word as a value (symbol)
/abc - selector/refinements for objects, functions, modules


Blocks are written with square brackets and contain:

Example block:

["Bob Smith" 57 5-May-2018 10:30]

Example block with words used as field names:

   name: "Bob Smith"
   age:  57
   date: 5-May-2018
   time: 10:30

This form is often used to create objects.

Example code:

if now/time > 10:30 [print "It's past 10:30"]

With a block you can:

Essentially, data and code blocks are the same. The difference is what you do with them.

Dialect Examples

Links to various dialect examples:

Example of not a dialect, but of parse function applied to text:

Other Examples

About | Contact | PrivacyREBOL Technologies 2021