Difference between revisions of "Getting Started with Recital"

From Recital Documentation Wiki
Jump to: navigation, search
(Running Recital Scripts)
(Create a Hello World Script)
Line 13: Line 13:
  
 
===Create a Hello World Script===
 
===Create a Hello World Script===
 +
Recital uses the vi/vim editor on UNIX/Linux by default, although you can set an alternative editor using the [[SET TEDIT|set tedit]] command.  A simple text editor, called using the [[TEXTEDIT()|textedit()]] function is also provided.
 +
 +
So, create a file called ''test.prg'' using your preferred editor and add the following line:
 +
 +
<pre>
 +
? "Hello World"
 +
</pre>
 +
 +
Save the file and run the [[DO|do]] command from the Recital prompt:
 +
 +
<pre>
 +
do test
 +
</pre>
 +
 
===Running the Hello World Script===
 
===Running the Hello World Script===
 
===Integrating our Recital Hello World Script with bash===
 
===Integrating our Recital Hello World Script with bash===
 
===Deploying our Recital Hello World Script on the Web===
 
===Deploying our Recital Hello World Script on the Web===
 
===Summary===
 
===Summary===

Revision as of 10:40, 23 July 2010

Getting Started with Recital

Starting the Recital Workbench

One of the most useful tools for writing Recital code is the Recital Workbench, a character mode interactive editing, debugging and execution environment in which commands are run as you type them and press Return.

You run recital by typing "recital" at a shell prompt. Linux also has a man page that describes how to use the recital command.

$ recital
$ recital --help
$ man recital

Running Recital Scripts

You can execute Recital scripts in one of two ways; from the command line (e.g. bash) or through a web server such as apache on Linux/UNIX or IIS on Windows. For the development of Recital applications that will be run from the command line, the Recital Workbench provides all the tools you will need to develop, debug, and test your applications.

Create a Hello World Script

Recital uses the vi/vim editor on UNIX/Linux by default, although you can set an alternative editor using the set tedit command. A simple text editor, called using the textedit() function is also provided.

So, create a file called test.prg using your preferred editor and add the following line:

? "Hello World"

Save the file and run the do command from the Recital prompt:

do test

Running the Hello World Script

Integrating our Recital Hello World Script with bash

Deploying our Recital Hello World Script on the Web

Summary