# Getting Started

PxPlus Environment |

PxPlus has capabilities and features that make the process of program development easier for both novice and expert users. When you are ready to develop a program in PxPlus, you begin by starting a PxPlus session. This serves as the environment where programming instructions are input, understood and executed by the system. It is also where you create, load, modify and execute applications. Once the session is started, you can create a new application or load an existing application for modification.

The basic start up and operation of the PxPlus programming environment begins with the procedures described below.

Starting PxPlus in MS Windows

In MS Windows, you can invoke a session by clicking the PxPlus shortcut under the Start > Programs > PVX Plus Technologies menu. This will start the PxPlus session within a new interface window (console).

Click the PxPlus icon at the top left corner of the window for a drop-down menu that enables you to manipulate console properties and session-related actions; e.g. changing the font size changes the size of the console work area.

These and other settings are saved in the pxplus.ini file each time PxPlus is terminated. By default, the Help menu below the PxPlus icon contains links that will not function properly until they are configured for use in an application.

Starting PxPlus in UNIX/Linux

On a UNIX/Linux system (non-graphical environment), PxPlus can be started by entering the command path (e.g. path/pxplus/pxplus). The session opens with a serial number and the PVX Plus Technologies Ltd. copyright notice and is followed by the PxPlus prompt - > (or -} under WindX). At this point, PxPlus interposes itself between you and the operating system and controls all work.

For information on the options for starting an application, see Customizing PxPlus.

## Modes of Operation

A PxPlus session is either in Command Mode or Execution Mode. The session initializes in Command mode, as indicated by the standard PxPlus prompt - >.

This prompt represents a "pointer" to the session input area known as the Command Line. It comprises two characters that may be altered by the system, depending on the current input mode or the "state" of a currently loaded program. The standard prompt, - > or -}, changes to -: when a program is being modified. It reverts back once the program is saved. When a program has been interrupted due to an error, the dash in the prompt changes to a number that indicates the current program level.

Command Mode

This is the state in which the system is "waiting for instructions" - in PxPlus, these instructions are known as Directives. When a valid directive is entered at the Command Line, the system proceeds directly to execution; there are no intermediate stages of compilation, assembly or linkage. When execution is complete, the system displays the result (if any) and awaits the next directive. Error messages pertaining to the syntax of the input are displayed as soon as they occur.

If a directive has a leading line number, the system does not proceed to execution, but uses the directive in the construction of a program. The PxPlus prompt changes from - > to -: to indicate that the program is being edited (and not yet saved). There may be other input modes during a PxPlus session (e.g. using an editor, running an application); however, command mode is where the system returns when these other tasks are completed.

#### Note:
Programs may be created without using line numbers. However, Numberless Programs must be edited and saved via full-screen editors, such as the PxPlus *IT - Integrated Toolkit and Ed+ program editor.

Execution Mode

Execution mode begins whenever a RUN or a CALL directive is used to execute a program during a PxPlus session. Some programs may be interactive and have a user interface that awaits input from the user while being executed - programs remain in Execution mode until completed via STOP or END, halted due to an error, or suspended via Ctrl - Break or an ESCAPE instruction.

Some PxPlus applications can be designed to start and run directly from an operating system prompt/icon. These are actually launched using an initialization procedure that "hides" the PxPlus session running underneath.

See the Language Elements Help section for information on loading, executing, and terminating programs in PxPlus.

## Command Line Editing

The Command line allows some basic editing functionality (but you cannot move from line to line, page up/down). When entering text on the Command line, most edit keys function as per the normal operation of a standard keyboard; i.e. Backspace deletes the preceding character, Spacebar inserts a space, cursor (Arrow) keys move through the input, etc.

In addition to the basic keyboard actions, the following key combinations can be used for further editing and cursor functionality:

| Ctrl-End | Clears input from the current cursor position to the end of the line.
| Tab/Shift-Tab | Advances/backspaces 10 spaces over input.
| Ctrl - Right Arrow | Advances to next word.
| Ctrl - Left Arrow | Moves to the previous word.

#### Note:
For information on more advanced editing features of the PxPlus development environment, see Development Tools.

Command Shortcuts

PxPlus allows the following shortcuts for frequently used language and console commands:

Key | Function/Purpose
? | Question mark substitutes the PRINT directive.
/ or \ | Either forward or back slash substitutes the LIST directive.
` | Back apostrophe substitutes the EDIT directive.
! | Exclamation mark substitutes the REM directive for a comment.
. | Period steps through a program. See Stepping Operations.
; | Semi-colon steps through compound statements.
" | Double quote opens a shell to the operating system from PxPlus.

#### Note:
The LET directive is assumed when PxPlus encounters a statement that begins with a variable. In addition, comma delimiters can be used to represent multiple LET directives in a statement.
Example:
Z4=A+4.5,Z5=Z4*.85

Typos and Alternate Spellings

The following alternate spellings are accepted without error (and corrected) when a statement is processed:

- PxPlus automatically appends quotes where closing quotes are missing.
- LIST directive can be entered as LSIT without causing an error.
- LOAD directive can be entered as LAOD without causing an error.
- END_IF directive can also be entered as FI.

The above spellings/shortcuts are built-in. Use the USER_LEX directive to change existing directive names in PxPlus.

## Command Line Recall

A history of Command Line input is maintained by the system throughout a PxPlus session. When a line is entered, the input is appended to the end of a buffer - the number of lines preserved in the buffer is configurable using the 'SL'= system parameter. When the buffer fills to capacity, the earliest lines are deleted to make room for new material.

Use the UP ARROW (or DOWN ARROW) key to select and recall lines to the PxPlus prompt - >. Each recalled line can be edited and resubmitted by pressing Enter, which has the same effect as typing and entering a new line at the prompt. You can reuse only one logical line at a time.

## Using the Mouse (Windows)

When running a PxPlus session in MS Windows, the mouse can be used to move the cursor along the Command Line, copy and paste text, or activate the drop-down menu from the PxPlus icon and access Help menu options.

#### Note:
While the initial console offers limited mouse support, the NOMADS toolset takes full advantage of the functionality available when working in a graphical environment. See Graphical User Interfaces.

Copy and Paste

Activate the Edit option from the PxPlus icon drop-down menu to copy or paste text using the mouse.

To copy (mark) text from the current session window into the Windows Clipboard:

| 1. | Select the PxPlus icon > Edit > Mark/Copy.
| 2. | Drag the mouse pointer over the block of text you wish to copy.
| 3. | Press Enter.

To paste text from the Windows Clipboard into the current session window:

| 1. | Place the cursor at a location on the Command Line.
| 2. | Select the PxPlus icon > Edit > Paste.

#### Note:
The PxPlus icon drop-down menu can also be accessed directly (without using the mouse) by pressing the Alt - Spacebar key combination.

## Exiting a PxPlus Session

A PxPlus session can be terminated using one of three directives: BYE, QUIT or RELEASE. When invoked from the Command Line or used in an application, these directives close all opened files, return all memory in use to the operating system, and terminate the PxPlus session.

On a Windows system, you can also click the X (close) button on the top right corner of the PxPlus console to terminate the session and close the window.

If STOP or END is used in an application that was invoked directly by an operating system command (bypassing Command mode), they will automatically terminate the session and return you to the operating system.