# Rebol Programming/The console
## The console

The interactive console is where you can do much of the programming needed to test small segments of code and to try out various functions. It's the best way to learn Rebol functions.
If you have Rebol/View you can access various utilities from the console, such as the Desktop, a text editor and basic utilities for inputs, usable in your programs.

### How to access the console

The console can be accessed directly when you start Rebol/Core using Rebol.exe but this will not allow you to use the desktop or editor commands.
If you start Rebol/View, it will start from the Viewtop. The console can be accessed in the left side of the window with the bottom icon. To get to the console, click on the icon. You can return to Viewtop by entering the desktop command at the console prompt.

### Using the console

Some important basics about the console are nice to know before starting with Rebol programming. You'll be spending a lot of time with the console!
Simply by typing commands, you can start using the console. If you type:
Rebol will return the current date and time
A different example:
Math is possible:
Notice the >> and == symbols:
    This is your prompt where you enter functions and commands.
    This is a symbol for a returned value from the previously executed program or operation.
The print function we used earlier just produced output at the console. The return value of the print function is a special value ignored by the interpreter when displaying results.
Let's try something that'll cause an error:
Rebol kindly produces an error information text using the ** symbol.

### History commands

If you want to retry these examples again, use the cursor up key on your keyboard to access Rebol's history of executed functions.
To move the console scroller you can use mouse or the Page-Up and Page-Down keys
To display previously entered lines you can use the Up and Down arrows, like on a Linux console.
To modify them use the Home and End keys with Delete, Backspace and Left or Right arrows.

### TAB auto-complete

The TAB key can be used for autocompletion: Rebol will try to complete what you are typing. For example if you press just a and then you press TAB, you'll get a suggestion of all words starting with a:
So, if you type ale, it will complete with alert, the only word starting with ale:
If you declare a variable, like aaa, Rebol will memorize it and it will auto-complete also with that.

### Console help functions

The console help can be accessed using the help command or its shortcut, the question mark ?. It can:
1- Find a word in the Rebol dictionary and describe its contents. Examples:
2- Describe the syntax of a function:
3- If you type part of an element in a string, Rebol will return any element with that string:
You can also use quotes to search for strings. Notice the difference between these two examples:
Other useful information about the current work session can be found using the following Rebol words:

### Stopping programs

You can stop a program, if it's run from the console, or if it outputs to a console opened from within the program, by pressing the Escape key. This will return you to the prompt.