Difference between revisions of "Recital Getting Started"

From Recital Documentation Wiki
Jump to: navigation, search
(Exiting Recital)
 
(27 intermediate revisions by one user not shown)
Line 1: Line 1:
{{YLM to do}}
 
 
==Starting Recital==
 
==Starting Recital==
 
<code lang="bash">
 
<code lang="bash">
Line 11: Line 10:
 
</code>
 
</code>
  
The first time you start Recital, you will be prompted to choose your system-wide [[SET COMPATIBLE|language]] and [[SET FILETYPE|filetype]] settings to ensure optimum compatibilty if you are migrating from an XBase system.   
+
The first time you start Recital, you will be prompted to choose your system-wide [[SET COMPATIBLE|language]] and [[SET FILETYPE|filetype]] settings to ensure optimum compatibilty if you are migrating from an XBase system.  Use the cursor keys to navigate the dialog and the ''spacebar'' to make a selection.
  
 
[[Image:compat_dialog.png]]
 
[[Image:compat_dialog.png]]
  
These settings will be written to the system [[Configuration Files|compat.db]] file.  The ''Compatibility'' dialog will be redisplayed at the start of an interactive session any time the ''compat.db'' file is not found.  The settings can also be altered by entering '''set compatible''' at the prompt.
+
These settings will be written to the system [[Configuration Files|compat.db]] file.  The ''Compatibility'' dialog will be redisplayed at the start of an interactive session any time the ''compat.db'' file is not found.  The settings can also be altered by entering [[SET COMPATIBLE|set compatible]] at the prompt.
  
 
<code lang="recital">
 
<code lang="recital">
 
> set compatible
 
> set compatible
 +
</code>
 +
 +
==System Windows==
 +
By default, Recital starts with ''system windows'' active.  Recital and SQL commands can be typed into the ''command window'' and the following commands operate in a window rather than full screen:
 +
 +
* [[APPEND]]
 +
* [[BROWSE]]
 +
* [[EDIT]]
 +
 +
Errors are displayed in the ''error window''.
 +
 +
To disable the ''system windows'', use '''-w''' when starting Recital
 +
 +
<code lang="bash">
 +
$ recital -w
 +
</code>
 +
 +
or [[CLEAR WINDOWS]] once in Recital
 +
 +
<code lang="recital">
 +
> clear windows
 +
</code>
 +
 +
Individual windows can be deactivated, hidden or shown with the following commands:
 +
 +
* [[SET COMMANDWINDOW]] - activate/deactivate the command window
 +
* [[HIDE WINDOW]] - hide the specified window
 +
* [[SHOW WINDOW]] - show the specified window
 +
 +
For all window commands, please see [[:Category:Screen Windows|Screen Windows]].
 +
 +
==System Menu==
 +
Many operations are available from the ''System Menu''.  For details on all the menu options, please see [[System Menu]].  Access the menu using the '''Home''' key or the '''/''' key.
 +
 +
[[Image:system_menu.png]]
 +
 +
==Status Bar==
 +
The [[SET STATUS|status bar]] provides information about the following:
 +
 +
* Currently active command
 +
* Currently active table
 +
* Access mode: '''Upd''' for update, '''Qry''' for query
 +
* Current [[Understanding Recital Databases#What is a Cursor|cursor]] number (if empty) or current record and record count of active table
 +
* Edit mode: '''Ins''' for insert
 +
 +
==Running Commands, Functions and Statements==
 +
Recital [[:Category:Commands|commands]], [[:Category:Functions|functions]] and [[:Category:SQL|SQL statements]] can be entered in the ''command window'' or main screen prompt.  Any output will be displayed in the main window unless redirected.
 +
 +
For an introduction to the Recital language, please see [[A Recital Primer]].
 +
 +
==Accessing Data==
 +
Data can be accessed using [[Using Navigational Data Access Commands in Recital|Recital data access commands]] or via [[Using Recital SQL|SQL]].  Follow the links for instructions on:
 +
 +
* Creating and opening databases, tables and indexes
 +
* Adding, updating, deleting and querying records/rows
 +
* Obtaining information about databases, tables and indexes
 +
 +
==Editing Files==
 +
Recital uses the Linux vim[http://www.vim.org/] editor by default, but can be configured to use your preferred editor with the [[SET TEDIT]] command.
 +
 +
The following synonymous commands are used to edit text files:
 +
* [[VI]]
 +
* [[ED]]
 +
* [[MODIFY COMMAND]]
 +
 +
<code lang="recital">
 +
> vi myprog
 +
</code>
 +
 +
If no file extension is specified, ''.prg'' is assumed.
 +
 +
==Running Programs==
 +
Programs can be run using the [[DO]] command
 +
 +
<code lang="recital">
 +
> do myprog with "myparam"
 +
</code>
 +
 +
or with function calling syntax
 +
 +
<code lang="recital">
 +
> myprog("myparam")
 +
</code>
 +
 +
Programs are compiled automatically when run (see [[SET COMPILE]] and [[SET DEVELOPMENT]] to configure this), creating ''.dbo'' files. 
 +
 +
Running a program with the [[DEBUG]] command activates the debugger and operates in ''interpreted'' rather than ''compiled'' mode.
 +
 +
<code lang="recital">
 +
> debug myprog with "myparam"
 
</code>
 
</code>
  
Line 28: Line 117:
 
</code>
 
</code>
  
==Editing Files==
+
or select '''File -> Exit''' from the [[System Menu]].  Access the menu using the '''Home''' key or the '''/''' key.

Latest revision as of 10:54, 7 September 2010

Starting Recital

$ db

or

$ recital

The first time you start Recital, you will be prompted to choose your system-wide language and filetype settings to ensure optimum compatibilty if you are migrating from an XBase system. Use the cursor keys to navigate the dialog and the spacebar to make a selection.

Compat dialog.png

These settings will be written to the system compat.db file. The Compatibility dialog will be redisplayed at the start of an interactive session any time the compat.db file is not found. The settings can also be altered by entering set compatible at the prompt.

> set compatible

System Windows

By default, Recital starts with system windows active. Recital and SQL commands can be typed into the command window and the following commands operate in a window rather than full screen:

Errors are displayed in the error window.

To disable the system windows, use -w when starting Recital

$ recital -w

or CLEAR WINDOWS once in Recital

> clear windows

Individual windows can be deactivated, hidden or shown with the following commands:

For all window commands, please see Screen Windows.

System Menu

Many operations are available from the System Menu. For details on all the menu options, please see System Menu. Access the menu using the Home key or the / key.

System menu.png

Status Bar

The status bar provides information about the following:

  • Currently active command
  • Currently active table
  • Access mode: Upd for update, Qry for query
  • Current cursor number (if empty) or current record and record count of active table
  • Edit mode: Ins for insert

Running Commands, Functions and Statements

Recital commands, functions and SQL statements can be entered in the command window or main screen prompt. Any output will be displayed in the main window unless redirected.

For an introduction to the Recital language, please see A Recital Primer.

Accessing Data

Data can be accessed using Recital data access commands or via SQL. Follow the links for instructions on:

  • Creating and opening databases, tables and indexes
  • Adding, updating, deleting and querying records/rows
  • Obtaining information about databases, tables and indexes

Editing Files

Recital uses the Linux vim[1] editor by default, but can be configured to use your preferred editor with the SET TEDIT command.

The following synonymous commands are used to edit text files:

> vi myprog

If no file extension is specified, .prg is assumed.

Running Programs

Programs can be run using the DO command

> do myprog with "myparam"

or with function calling syntax

> myprog("myparam")

Programs are compiled automatically when run (see SET COMPILE and SET DEVELOPMENT to configure this), creating .dbo files.

Running a program with the DEBUG command activates the debugger and operates in interpreted rather than compiled mode.

> debug myprog with "myparam"

Exiting Recital

To exit Recital, type quit at the prompt:

> quit

or select File -> Exit from the System Menu. Access the menu using the Home key or the / key.