Type

PURPOSE:  The TYPE command displays calculated values, comments, or other information at the terminal.  TYPE generates an automatic carriage return and line feed at the end of each line unless specifically suppressed by one of the options described below.  TYPE may be used interactively at command level or stored in a CM or PM.  The TYPE command will also operate the same as the LIST command (see form 2).

Syntax

FORM 1:

TYPE [\\items\\] [NOCR; NOSKIP] [IF; UNLESS clause]

TYPE

with no options simply generates a carriage return and line feed.

items

is one or more objects to be displayed at the terminal.  Items are separated by commas.  ACCENT R does not, however, separate them by commas or spaces when displaying their values at the terminal.  Space(s) between displayed values must be specified in the item list.  Valid objects in an object list are shown below.

 

Valid TYPE Items

 

ITEM

System Fields and Global names

Constants

Literals

Expressions using System

Arithmetic expressions using above objects

nB or nS (number of blanks)

n "characters"

EXAMPLE

TYPE @TIME

TYPE 7700

TYPE "NEW YEAR" IF@MONTH = 1

TYPE @DATE -@CAL"5/2/80"

TYPE 23*7/15*.O5

TYPE 4B, "REPORT"

TYPE 25 "-"

NOCR; ,NOSKIP

suppresses the carriage return and line feed normally generated after the displaying of the last object in the list.  A comma precedes either option.

IF; UNLESS

is a conditional clause that controls execution of the TYPE command.  If omitted, the TYPE command is unconditionally executed.

EXAMPLE

*TYPE 9003/187 * .94 + 155**3/@SQRT 44 561440.4
*TYPE "TODAY IS", 1B, @DATE TODAY IS 10/15/90

NOTES:  The TYPE  command can perform all the operations of a desk calculator, including Exponentiation and square roots.  ACCENT R performs the specified calculations and displays the result at the terminal.

The TYPE command sends output only to the terminal or to an ACCENT R LOG file.  It can be used in a Command Module or a Process Module.

FORM 2:

TYPE object_type object_name [IN DBL dbl_name]

object_type

specifies the type of DBL object.  Types allowed are CF, CM, CS, DI, GS, ID, PM, SD, SF, SI.

object_name

references the specified object to be listed.

EXAMPLE

*TYPE PM INVOICES

SEE ALSO:  PRINT statement, LIST statement