Differences between PQ and PQN Proc

This topic summarizes the differences between PQ and PQN Proc, indicating which PQN Proc commands are not available in PQ Proc, which are exactly the same, and which function differently.

PQ vs. PQN Procs

Delimiters

PQ Proc uses a blank as a delimiter between parameters in a buffer.

PQN Proc uses an attribute mark as the delimiter between parameters in a buffer. This makes it possible to have parameters that are null, contain embedded blanks or match the format of Reality file items.

For the sake of compatibility, the PQ Proc commands that use a blank as the delimiter have not been changed. Additional commands have been added to take advantage of the PQN Proc delimiter.

In commands that reposition the buffer pointer, PQ Proc leaves the pointer pointing to the first character of the parameter. In PQN Proc, the pointer points to an attribute mark.

The first line of a Proc determines which type of delimiter is used and which commands are available for use. If the first line of the Proc contains PQ, it signifies that the Proc uses a blank as the delimiter. If the first line of the Proc contains PQN, it signifies that the Proc uses an attribute mark as the delimiter.

Buffer Referencing

Buffer referencing is not available in PQ Proc.

File buffers and select registers are used only in PQN Proc.

Transfers between Procs

Transfers between Procs must be compatible.

PQ Procs can only transfer to other PQ Procs.

PQN Procs can only transfer to other PQN Procs.

Writing New Applications

Because PQN Procs have most of the capabilities of PQ Procs, plus many more, it is recommended that you write all new applications using PQN Procs.

PQN Procs do not run on SMA Reality systems; only PQ Procs run on those systems. If you are writing software for SMA Reality systems, refer to the appropriate documentation for those systems.

Summary of Command Differences

The following commands are available only in PQN Proc:

F;

FB

F-CLEAR

F-DELETE

F-FREE

F-KLOSE

F-OPEN

F-READ

F-UREAD

F-WRITE

IBH

IBN

IBP

L

MS

MV

MVA

MVD

   

The following commands function exactly the same in PQ and PQN Proc.

-

( )

[ ]

+

C

D

G

GO B

GO F

GOSUB

IF

IF (mask)

IF E

IFN

M

O

P

RI

RO

RSUB

RTN

S

STOFF

STON

TR

U

X

 

The table below presents a comparison of the functions of the commands that operate differently in PQ and PQN Proc.

In addition to the commands shown in the table, there is another difference to note with regard to the multivalued IF command. In PQ Proc, the multivalued string against which the comparison is to be made cannot contain blanks, unless they appear within a pattern. The Proc processor assumes that everything after a blank is part of the command.

Also, note that the IT command does not convert attribute marks in the data read from tape to blanks, so the use of most Proc commands on the data read from tape is limited.

Command

PQN PROC Function

PQ PROC Function

A

Moves from one attribute mark to the next, including embedded blanks.

Moves from the first nonblank to the next blank.

B

Moves the input buffer pointer back to the previous attribute mark.

Moves the input buffer pointer back to the first character of the previous parameter.

BO

Moves the output buffer pointer back to the previous attribute mark.

Moves the output buffer pointer back to the first character of the previous parameter.

F

Moves the input buffer pointer forward to the next attribute mark.

Moves the input buffer pointer forward to the next character of the next parameter.

H

Moves the subsequent character string into the current output buffer location replacing each set of one or more blanks with a single attribute mark.

Moves the subsequent character string into the current output buffer location with blanks preserved.

IH

Moves the subsequent character string into the current input buffer location replacing each set of one or more blanks with a single attribute mark.

Move the subsequent character string into the current input buffer location with blanks preserved.

IP

Moves input data into the current input buffer location, replacing one or more blanks with a single attribute mark.

Moves input data into the current input buffer location with blanks preserved.

T

As described.

As PQN except element can only be : 'text', "text", B, C, In, Xn, (c, r), (-n) (where n, c, and r are literals). Also, continuation lines are not supported.