RATS 10.1
RATS 10.1

Text windows are your primary means of interacting with the RATS program. In interactive mode, they are used to hold both the input (instructions or programs that you want to execute) and most of the output (displaying of results). Even the Wizards operate by writing instructions into a text window so you can reproduce the results later without going through the dialogs again.


The following is a sample screen layout for (Windows) RATS showing a set up with a single text window.
 


 

It's important to note that the RATS text windows use only "monospaced" fonts (Courier is by far the most common of these). In a monospaced or typewriter font, all characters are the same width, making it easy to line up different types of output. You can see in the above how the characters line up vertically—even the ones that in a document font would take up very little space (like .) get the same amount of space on the line. If you would like, you can change the font and font size (on the Preference dialog), but can only choose from the small list of monospaced fonts, and you can't do boldface, italics or other formatting—you would have to add those in a target document.


The wider graph strip on the left edge is used to show line numbers (which can optionally be removed using the Preference dialog), and the narrower one is used to show Markers (controlled using the Edit—Markers menu items) which can be helpful in navigating around a large file. See the description below.


When a text window is active, the status bar at the bottom of the application will show the current cursor position (here line 14, column 1) and whether or not the information has been modified since the window was opened (here, it has).


You can have as many text windows open as you would like. However, there is at any time, only one Input Window and one Output Window (both of which can be a single window). See Input and Output Windows for more information.

Input Window

RATS will only execute instructions from the input window. When you are working in the input window, you can use the <Enter> key or the  icon to execute instructions. The input window has a {i} tag at the end of the file name, though that's just for display purposes within RATS.

 

Output Window

One, and only one, of the open text windows is designated as the output window. RATS sends any (text) output it generates to the output window. This is inserted at the insertion point of the window. The output window has a {o} tag at the end of the file name. If a window is both input and output, the tag after the file name is {io}, as is the case above.

 

The Use for Input and Use for Output operations on the Window Menu allow you change which windows are "input" and "output".

Toolbar

When a text window is active, the following icons will appear in the toolbar (some may be dimmed and thus unavailable depending on current conditions, as described below):
 

 (Open)

Shortcut for File—Open. Opens a text file

 (Save)

Shortcut for File—As.... Saves text to a disk file.

 (Print)

Shortcut for File—Print. Prints the contents of the active window.

 (Cut)

Shortcut for Edit—Cut.

 (Copy)

Shortcut for Edit—Copy.

 (Paste)

Shortcut for Edit—Paste.

 (Find)

Shortcut for Edit—Find. Searches for text in the active window.

 (Paste Function)

Shortcut for View—Standard Functions. This brings up the RATS function lookup wizard.

 (Use for Input)

Shortcut for Window—Use for Input. Sets the current window as the Input window.

 (Use for Output)

Shortcut for Window—Use for Output. Sets the current window as the Output window.

, (Split I/O)

These both provide an easy way to set up split input and output windows. Clicking either button opens a new window, designates the new window as the output window, and does a Window—Tile operation to tile the windows. The first button Tiles the windows horizontally, the second Tiles them vertically.

 (Select All)

Shortcut for Edit—Select All. Selects all text in the window.

 (Execute Instructions)

Runs (executes) the instruction on the current line, or the selected (highlighted) instructions. Equivalent to hitting the <Enter> key.

 (Stop)

While RATS is executing instructions, the "Run" icon changes to this "Stop" icon. You can click on this to interrupt RATS. RATS will bring up a dialog box asking if you want RATS to Skip (halt) the current instruction(s), or ignore the "Stop" signal and continue executing the instruction(s).

, (Ready/Local)

The "R/L" (left) icon shows that RATS is in "Ready" mode. Clicking on this switches RATS to Local mode, at which point the icon will change to the right ("L/R") icon. You can click on this to return to Ready mode. These buttons are equivalent to hitting <Ctrl>+L.

 (Clear Memory)

Shortcut for File—Clear Memory. This clears all information from memory, including CALENDAR settings, data series and other variables, equations, formulas, etc. Only use this operation if you want to start fresh and re-run an entire program from the beginning.

"Bracket" Matching

In complex mathematical expressions, it's sometimes hard to keep track of the nesting of parentheses. The editor has a built-in "bracket" matcher which helps manage these. If you cursor over or type a ( or a ), it will show the matching pairs in orange as shown below on line 93. (Note that there is a pair of matching ()'s inside the highlighted pairs). If you cursor over or type a ( or ) which has no mate, it will show as red instead. The same is done with pairs of {} although that is rarely much of a problem.

 

This treats all ()'s the same, whether they are part of an arithmetic expression or delimiting an option field.


 

 

Markers

A text window can have (at most) one marker associated with it. A marker identifies a particular existing line in a window—if you add lines above it, the marker will move down so the original line is still "marked". Note, however, that the marker only exists for a single RATS session and a single window. If you close RATS and open it again, or open a second view on an existing file, the marker will not be present.

 

You can set or reset the marker using Edit—Markers—Set Marker. The marker can be used with the Edit—Markers—Goto Marker, which moves the cursor and the window view to the marked location, and Edit—Markers—Select To Marker, which selects all text from the current cursor location to the marked line (including the full marked line regardless of whether you are selecting "up" or "down").

 


Copyright © 2025 Thomas A. Doan