Each product and program carries a respective written warranty, the only warranty on which the customer can
rely. Paxar reserves the right to make changes in the product and the programs and their availability at any
time and without notice. Although Paxar has made every effort to provide complete and accurate information
in this manual, Paxar shall not be liable for any omissions or inaccuracies. Any update will be incorporated in
a later edition of this manual.
Monarch®, Sierra Sport, and 9433 are trademarks of Paxar Americas, Inc.
Paxar® is a trademark of Paxar Corporation.
Avery Dennison® is a trademark of Avery Dennison Corporation.
Microsoft®, Windows®, and NT® are trademarks of Microsoft Corporation.
Avery Dennison Printer Systems Division
170 Monarch Lane
Miamisburg, OH 45342
The Application Development Kit II (ADK2) is a product for Microsoft Windows
95/98/Me/NT/2000. It allows you to create an application program to run on the printer. You write
the script with the ADK2 command language.
You can program the printer to:
♦ print labels or tags
♦ print data streams written for other printers
You can define lookup tables for the script running on the printer. It also allows you to define
records such as temporary storage buffers.
This manual is written for the Monarch Sierra Sport 2 9460 printer. Refer to the printer’s
Operator’s Handbook
Reference Manual
or
Quick Reference
for data stream information.
for printer-specific information. Refer to the
1
Packet
How to Use this Manual
This manual contains the following information.
Chapter 1
Overview
Chapter 2
Using the Software
Chapter 3
Printer Procedures
Chapter 4
Program Structure
Chapter 5
Command Reference
Appendix A
Sample Script
Introduces ADK2.
Tells you how to use the software for entering, editing, compiling, and
printing your script.
Explains tasks done on the printer separate from the application.
Tells you how to write the script’s source code.
Describes the commands you use to write your script.
Lists a sample script.
A Review of Terms
Throughout this manual, you will see references to the different terms that you must be aware of
before programming an ADK-version 9460 printer.
A
file
is a collection of related data, stored together in one unit. There are three types of files:
scripts, formats, and lookup tables.
A
script
is a type of file. It is the source code for a program that runs on the printer.
project
A
project must have at least one script, but formats and lookup tables are optional.
An
is a collection of related files. The files can be a scripts, formats, or lookup tables. A
application
is a project that has been built into a form executable by the printer.
Overview 1-1
1-2 Overview
USING THE SOFTWARE
This chapter explains how to
♦ start a new project.
♦ build a project into an application.
♦ download an application.
System Requirements
Here are the recommended system requirements.
Recommended
Computer Personal computer with Microsoft Windows 95/98/Me/NT/2000
Processor Pentium – 150 Mhz
Memory 32 Meg
Disk space 5-10 Meg
Communications Port Serial
Printer Monarch Sierra Sport 2
Installing the Software
2
1. From the Start menu, run the file SETUP.EXE.
2. Respond to the prompts as necessary.
Connecting the Printer
Connect your printer to the PC using either a DB9 to 9 pin (part 12029314) or DB9 to 25-pin (part
12029315) serial communications cable. For more information about connecting the cable, refer to
your
Operator’s Handbook
or
Quick Reference
.
Using the Software 2-1
Getting Started
1. Start the ADK2 software. You will see
Project Tree
Builder Output
The screen has three major sections: the Project Tree, Working Area, and Builder Output. You can
use the V
♦ The Project Tree lists all the files in the open project. See “About Projects” for more
♦ The Working Area is the text editor for the files in the project.
♦ The Builder Output lists any errors or messages that appear when you build the
iew menu to change which areas appear on your screen.
information.
project.
Working Area
2. Start a new Project: Select New from the Project Menu.
3. Enter a name for the Project. Press f . You will see the Project Properties screen.
4. Accept the default directories or change the directories.
5. Select 9460 from the Printer Type box. Press f . The project file structure is set up. You
return to the Main screen.
2-2 Using the Software
6. Select New from the File Menu to start writing a script. Initial comments are automatically added
in the Working Area of the screen.
As you type your script, the ADK2 keywords appear in blue and the script text also appears
in different colors, depending on what the text item is. To change the keyword colors, the
text to upper or lower case, or show white space, right mouse click in the Working Area of
the screen and make the appropriate selection. If you select Properties, you will see
7. Make any changes you want to the text color and tab sizes, enable line numbering, etc. Click
f when finished.
8. Finish writing your script.
Using the Software 2-3
Saving a File
Select Save from the File menu. The default sub-directory is \Scripts in the selected project
directory. The file is saved with .CFS extension (configuration source). The first time you save the
file, it will prompt you if you want to add this file as a script in the currently open project.
About Projects
The Project Tree lists all the files in the open project. The project tree contains the following
directories: scripts, formats, and lookups.
Scripts Multiple scripts can be included in the \Scripts directory for use in the current project.
1. Highlight the \Scripts directory.
2. Right mouse click and select Add Files to Folder.
3. Locate and select the script to add. Click Open.
NOTE:One script must be marked as the Main script before building.
Highlight the script. Right mouse click and select M
You must use the INCLUDE command in the script to include the
other scripts.
Example:
Define SCRATCH, 5000, A
INCLUDE c:\ADKProjects\MyStore\Scripts\price.cfs
Function Start
Begin
.
.
.
ark as Main.
Formats Add format files to the \Formats directory for use in the current project.
1. Highlight the \Formats directory.
2. Right mouse click and select Add Files to Folder.
3. Locate and select the format to add. Click Open.
NOTE:You must use the LINKFILE command in the script to include the
format.
Example:
Define SCRATCH, 5000, A
LINKFILE c:\ADKProjects\MyStore\Formats\shipping.fmt
Function Start
Begin
.
.
.
2-4 Using the Software
Lookups Add lookup tables to the \Lookups directory for use in the current project.
1. Highlight the \Lookups directory.
2. Right mouse click and select Add Files to Folder.
3. Locate and select the lookup table to add. Click Open.
NOTE:If you do not use the LOOKUPDEF command in the script, when the
script is downloaded, you are prompted for the lookup file.
Example:
Define SCRATCH, 5000, A
LOOKUPDEF c:\ADKProjects\MyStore\Lookups\prices.txt
Function Start
Begin
.
.
.
Building Projects
When a script has been marked as the Main script, you are ready to build.
1. Select Build from the Project Menu.
2. The Builder Output portion of the screen shows different types of messages: Build Successful,
Build Aborted, Syntax Error, etc. A successfully built project file is saved with a .CFU extension.
NOTE:You can select P
roperties from the Project Menu to change file extension.
3. Specify the download settings.
4. Download the built file to the printer.
Changing the Download Settings
Before downloading a project to the printer, make sure the download settings at the PC match those
at the printer.
To change the PC’s download settings:
1. Select Download Settings from the Project Menu.
2. Select the communications port (COM1, LPT1-2, or TCP/IP).
3. Click Settings.
Using the Software 2-5
If you select COM1 - COM4:
4. Make changes as needed to the Baud, Parity, Data Bits, Stop Bits, and Flow Control. Click f
twice.
NOTE:Changing these parameters only affects your PC, not the connected printer. Refer
to your printer’s documentation for more information about changing the printer’s
communications parameters.
If you select LPT1 – LPT2:
Compatible mode is for uni-directional communications. With this mode, you can send files
to your printer, but you will not receive printer status information. Select this mode if you
are unsure of your printer’s parallel port configuration or your PC’s parallel port
configuration.
IEEE1284 mode is for bi-directional communications. With this mode, you can send files to
your printer and receive printer status information, such as error messages.
Only select this mode if:
♦ your printer supports IEEE-1284 and it is enabled.
♦ your computer supports ECP mode and ECP mode is enabled on your computer’s
parallel port. This is typically selected in your computer’s BIOS setup, which is
normally accessed whenever you turn on your computer.
This screen appears differently for Microsoft Windows NT® and Windows® 2000 users.
Windows NT:
For Windows 2000:
Use the Direct Memory Access (DMA) channel assigned to your LPT port. The
DMA normally defaults to 3. This can be changed in your computer’s BIOS
setup.
Use the Direct Memory Access (DMA) channel assigned to your LPT port. The
DMA normally defaults to 3. Enable the LPT port’s Interrupts using Device
Manager.
5. Make a choice and click f when finished.
2-6 Using the Software
If you select TCPIP:
4. Enter your printer’s TCP/IP Address. See your System Administrator for more information.
5. Enter your printer’s TCP/IP Port (typically 9100). See your System Administrator for more
information.
6. Determine appropriate bi-directional setting:
♦ Disabled/Unchecked is for uni-directional communications. With this
mode, you can send files to your printer, but you will not receive printer
status information. Disable/Uncheck this selection if you are unsure of
your printer’s parallel port configuration.
♦ Enabled/Checked is for bi-directional communications. With this mode,
you can send files to your printer and receive printer status information,
such as error messages. Only select this mode if your printer is set for
IEEE1284 mode. Refer to your printer’s manual for more information.
7. Click f to exit the Download Configuration screen.
Downloading a Project
After the project has been built, you are ready to download it to the printer.
1. Verify that the download settings are the same at both the PC and printer. See “Changing the
Download Settings,” for more information.
2. Select Download from the Project Menu. Messages appear as the file is downloaded to the
printer.
Editing Existing Projects
1. Select Open from the Project Menu and locate the project file. It as a .CFP extension.
2. Make any changes to your script, format, or lookup file(s).
3. Save your changes.
4. Re-build the project.
5. Download the project to the printer.
When you close the ADK2 software, it saves the current views and which project files are open.
When you re-open the project, the software restores the views and the previously opened project
files.
Using the Software 2-7
2-8 Using the Software
PRINTER PROCEDURES
Applications should be written so that they run continuously when the machine is on. However, there
may be instances where you need to “go behind the scenes” to troubleshoot the printer, reload an
application, perform maintenance or set parameters.
3
Displaying the Ready Prompt
Before doing anything, you must display the Ready prompt on the printer.
Ready
p X
How you do this depends on whether the printer has an application loaded.
No Application
When there is no application in the printer, the Ready prompt appears automatically when you turn
on the printer.
Loaded Application
To display the Ready prompt with a loaded application:
1. Turn on the printer. In a moment, the battery charge indicator appears.
E B F
2. Press the F key with the batter charge indicator on the screen. The following menu appears:
Start Appl.
Online
E D
3. Choose Online. The Ready prompt appears.
NOTE: Online is different from Online Diagnostics in the tool box.
Accessing the Toolbox
You may need to run diagnostic tests, perform maintenance or set parameters on the printers. To do
this, access the toolbox, as follows:
1. From the Ready prompt, press the left A button (under the p icon).
Ready
p X
2. The battery charge indicator appears.
E B F
RXT
Printer Procedures 3-1
3. Press the right A button (under the T icon). The following menu appears.
Tool Box
Language
Exit
E D
4. Choose Tool Box.
Note: When you exit the tool box, the Ready prompt appears.
5. Use the tool box to perform the tasks you need to do. See the
more information.
System Administrator’s Guide
for
Loading Applications
After you use the tool box, you must restart the existing application or load a new one.
Restarting Existing Applications
To restart the application (after using the tool box):
1. From the Ready prompt, press the right A key (under the X icon). The following menu appears.
Start Appl.
Online
E D
2. Choose Start Appl.
Loading New Applications
To load a new application, see Chapter 2, “Using the Software.”
3-2 Printer Procedures
PROGRAM STRUCTURE
This chapter discusses program flow control, buffer definitions, and other useful information for
writing your script.
Below is a sample of what a script may look like.
DEFINE TEMPORARY, RegPrice, 6, A
DEFINE TEMPORARY, NewPrice, 6, A
DEFINE PRINTER, PrtRegPrice, 7, A
DEFINE PRINTER, PrtNewPrice, 7, A
FUNCTION Start
BEGIN
CALL InitApp
CALL GetRegPrice
CALL GetNewPrice
CALL PrintTags
END
FUNCTION InitApp
BEGIN
CLEAR Printer
CLEAR RegPrice
.
.
.
END
.
.
.
4
Functions
A function is an independent group of statements usually performing a specific task. You execute a
function with the CALL command. See Appendix A, "Sample Script," for a sample script.
Rule: Each function must have a BEGIN and an END.
FUNCTION function-name
BEGIN
.
function-body
.
END
Program Structure 4-1
Starting a Script
Every script has the primary function START. The START function is the starting point of your
program. Script execution control starts with the first command in START, and stops when the last
command in START is performed.
FUNCTION START
BEGIN
.
program-body
.
END
Files and Buffers
The Lookup table is a collection of records. Data is stored in the printer as an ASCII flat file.
You can tell the printer how to store defined buffers in memory. You can define the following
buffers:
♦ Scratch buffer
♦ Lookup table buffer
♦ Temporary storage buffer
♦ Printer buffer
♦ Array buffer
A buffer may contain up to 255 separate fields, each field being 1 to 999 bytes long.
Use the DEFINE command to specify the field definitions. Field-type, field-name, field-length, and
data-type are the fields used to define the buffer. See Chapter 5, "Command Reference," for more
information.
Lookup Table Definition
The lookup buffer is the working area for data downloaded to the printer. The lookup table definition
tells the printer how the lookup records are received from the PC. The printer allocates buffer space
for the record when it receives the definition.
The number of records stored depends on the size of each record and the script's size.
Temporary Storage Definition
The temporary storage buffer is used as a temporary storage for arithmetic operations and temporary
variables.
4-2 Program Structure
Printer Definition
The printer buffer is used to store data to print.
Rule: The field lengths in the printer buffer must equal the length of the largest
corresponding field in the formats. For example, if...
the length of Field 1 of Format 1 is 7
the length of Field 1 of Format 2 is 22
the length of Field 1 of Format 3 is 12
Then, the first field's length in the printer buffer must be 22.
Arrays
You can use an array to store data similar to temporary storage. An array is a series of elements
with the same data type. Arrays can be either numeric or alphanumeric. You can access an element
of an array by providing the array name and an index value. This index value can be a numeric
literal, a numeric buffer-field, or the input buffer. For example, Prices [4] points to the Prices array's
fourth element.
In addition to the information for the DEFINE command listed above, you must also list the number of
elements in the array (the maximum index value). See Chapter 5, "Command Reference," for more
information.
Scope of Field Names
Keep in mind the following information.
♦ You can access all variables globally.
♦ Field names and labels can be up to 255 characters long. However, the first 12 characters must
be unique.
Script Flow Control
You can branch the flow of command control in different ways. The order in which the commands
appear in the script controls the program's flow. At times, control is passed to another command
through the use of valid labels, invalid labels, and the JUMP command. See Chapter 5, "Command
Reference," for information about JUMP.
When a command fails, control passes to an invalid label, if you defined one. For example, the
invalid label may show a message on the printer display. If the script does not identify an invalid
label, control passes to the next line following the executing command. Similarly, when execution is
successful, control passes to a valid label, if you defined one. And, if you did not define a valid
label, control passes to the next line.
Rule: Precede all valid and invalid labels by an asterisk, (*). For example,
ADD CONTROL , TEMP1 , *ERROR2, *SUCCESS2
Program Structure 4-3
Comments in a Script
You must precede comments by a semicolon. The software treats them as a single white space and
ignores them.
;*********************************************************
;*
;* Description
;* This is the main entry point of
;* the script. Gets the Date and
;* then starts processing.
;*
;*********************************************************
Data Storage
Although you can define a buffer field as being numeric or alphanumeric, the printer stores both
kinds of data as ASCII characters, as follows:
Data Type Description
Alphanumeric Sequences of any ASCII characters.
Numeric
Sequences of numeric ASCII characters. For example, the printer
stores 91 as the two-byte alphanumeric string "91."
Data Coding
To streamline the amount of data you store or pass to and from the printer, you can encode the data.
For example, you could encode a number as high as 255 by storing the corresponding character from
the ASCII chart. For example, 91 (a two-byte character string, according to printer data storage
rules) could appear as [, the ninety-first character on the ASCII chart.
There are two commands you can use in your script when encoding and decoding data according to
this method.
Command Description
ASC
CHR
Consider the following code sample.
DEFINE TEMPORARY, QTY1, 3, A ; Alpha Temp. field
DEFINE TEMPORARY, QTY2, 3, N ; Numeric Temp. field
MOVE "}", QTY1 ; Now contains "}"
ASC QTY1, QTY2 ; Decodes "}" to 125
INC QTY2 ; Increments 125 to 126
CHR QTY2, QTY1 ; Encodes 126 to "~"
This sample demonstrates how to decode a number, use the number in a computation, and encode
the result back to a character.
Takes an ASCII character and returns the number corresponding to
it on the ASCII chart.
Takes a number from 0-255 and returns the corresponding
character on the ASCII chart.
4-4 Program Structure
COMMAND REFERENCE
This chapter lists, in alphabetical order, the commands you use to write your script. Each command
is discussed in detail to include the correct syntax.
5
Programming Conventions
The commands use the following conventions.
KEYWORDS
Place holders
[optional]
Example
*label
Repeating Items
Missing Items
You must type the upper-case text.
CALLfunction-name
Text in italics are place holders.
CLEARitem
Optional items appear in brackets.
CHECKitem [,[<MI>invalid label]
[,valid label]]
Text in bold courier font are examples of the command in use.
ADD WHOLESALE , TEMP2
Text with an asterisk, "*", is a label signifying a place to jump to in
the script.
ADD CONTROL , TEMP1 , *ERROR2
Horizontal ellipsis dots following an item in a syntax description
indicate more of the same item may appear.
FETCH COMM
Vertical ellipsis dots used in examples and syntax descriptions
indicate a portion of the code is omitted.
Ex. ADD WHOLESALE, TEMP2
.
.
.
ADD TEMP2, TEMP1
Field Names
The logical field names used in the command sections are examples. For example, TEMP1 is used
throughout this chapter as an example of a temporary buffer field name.
Command Reference 5-1
Keywords
The following keywords are reserved by the compiler. Do not use them as identifiers.
1200 DTRDTE NONE
1200 19.2K 2400
4800 9600 ADD
APPEND APPVERSION ARGREAD
ARRAY ASC AUTOSTART
AVAILABLEDATA BACKLIGHT BATTERY
BAUDRATE BEEP BEGIN
BITCLEAR BITMASK BITSET
BITSHIFT BITTEST BSEARCH
CALL CASE CHARTYPE
CHECK CHR CLEAR
CLOSECOMM COMM COMM2
COMPARE CONCAT CONTINUOUS
CSTRIP CURRENT CURRENCY
DATABITS DATACOLLECT DATACOLLECTFILE
DATATYPE DATE DATELEN
DEC DEFINE DELAY
DELIMITER DISABLE DISPLAY
DIVIDE DOWNLOAD DTRDTE
ECHOBELL ELSE ELSEIF
ENABLE END ENDIF
ENDSWITCH ENDWHILE ENTER
EVEN EXECUTE EXIT
F1 F2 F3
F4 F5 F6
FAILSAFE FETCH FIELDLEN
FIXDATA FORMAT FUNCTION
GENERATE GET HEADER
HOTKEY IF IMAGEBUFFER
IMAGEFIELD INC INCLUDE
INPUT INPUTTEMPLATE INSERT
JUMP KEYBOARD LABELCOUNT
5-2 Command Reference
LEFT LINKFILE LINKFMT
LOCATE LOOKUP LOOKUPDEF
LOOKUPFILE LOOKUPSIZE LOWER
LSTRIP MACRO MARK
MID MOVE MULTIPLE
MULTIPLY NONE NUMBERPRINTED
ODD ONDEMAND OPENCOMM
PACKRECORDS PAD PARITY
PARSE PRINT PRINTER
PROMPTS QUERY RAM
RAVAIL RCLOSE READ
RECORDDELETE RESPONSE RESTORESCREEN
RETURN REVVID RIGHT
ROPEN RREAD RSTRIP
RTSCTS RWRITE SAVESCREEN
SCANLEN SCANNER SCRATCH
SEEK SETDATE SHUTDOWN
SKIP SPACE START
STATUSPOLLING STOPBITS STRIPS
SUB SUSPEND SWITCH
SYSSET SYMBOL TEMPORARY
TOKEN TRIGGER TRIGGERENABLE
TSTRIP UPLOAD UPLOADDEF
UPPER VALIDATE WHILE
WRITE XONXOFF
NOTE:Not all of these keywords apply to the 9460 printer; however, they are still reserved
by the compiler.
Command Reference 5-3
Special Characters
The following special characters are reserved for the printer. Do not use them in your script.
{ left brace
_ underscore
| pipe or split vertical bar
} right brace
~ tilde
\ backslash
` grave accent
However, you can use these characters in a string with quotation marks.
Use the tilde character (~) along with the corresponding ASCII code in strings to represent nonprintable characters. For example, ~013 represents a carriage return.
The tilde sequence also works for using a double quote in a quoted string in a command parameter.
For example, to move a double quote (") to the scratch buffer, enter:
MOVE "~034", SCRATCH
Script Flow
Script flow branches out to other functions and labels, depending on whether a command was
successful or if it failed.
When a label is defined...
♦ If a command was successful and a valid label is defined, control passes to that label.
♦ If a command fails and an invalid label is defined, control passes to that label.
When a label is NOT defined...
♦ If a command was successful, control passes to the next line.
♦ If a command fails, control passes to the next line.
5-4 Command Reference
Functional Relationships
Some commands logically work together or are related in function. The commands are discussed in
the following functional groups.
Math Commands
ADD Adds the numeric values of two fields.
DEC Decrements numeric fields.
DIVIDE Divides the contents of one field by the contents of another.
INC Increments numeric fields.
MULTIPLY Multiplies the contents of one field by the contents of another field.
SUB
Subtracts the contents of one field from the contents of another
field.
Script Control Commands
CALL Calls a section of code as a subroutine.
CHECK Checks the status of system parameters.
DELAY Delays the current script for a specified time.
EXIT
IF
JUMP Transfers control to a label.
RETURN Exits a subroutine.
SWITCH
SYSSET Sets system parameters.
WHILE
Leaves the current script. If the printer re-enters the script,
control passes to the script's first line.
Performs a series of one or more commands based on the
existence of a condition.
Branches to a set of commands, based on the value of a
variable.
Repeats a series of one or more commands based on the
existence of a condition.
Compiler Directives
DEFINE Defines the field definitions for the buffers.
INCLUDE Inserts the source statements in the file into the current script.
LINKFILE Links formats to the script so they can download to the printer.
MACRO Defines or invokes a program for a repeating process.
Command Reference 5-5
Data Manipulation Commands
ARGREAD Extracts an argument from a comma-delimited string.
ASC
BITCLEAR Sets the specified bit to zero.
BITMASK Allows bit logical operations on buffers.
BITSET Sets the specified bit to one.
BITSHIFT
BITTEST Checks the specified bit to see if the bit is a one or a zero.
CHARTYPE Allows you to limit the character type for an input buffer.
CHR
CLEAR Clears buffers or files.
COMPARE Compares the contents of two fields.
CONCAT Appends the contents of one field to another.
CSTRIP Extracts specific characters for a string.
DATATYPE Restricts the type of data for the GET command.
FIELDLEN Places the length of one field into another.
Converts ASCII data from a numeric format to an alphanumeric
format.
Allows bits within a value to be arithmetically shifted left or
right.
Converts ASCII data from an alphanumeric format to a numeric
format.
GENERATE Creates a check digit.
INSERT Inserts data from one buffer into another.
LEFT Extracts the left-most characters from a string.
LOWER Converts characters in a field to lower-case.
LSTRIP
MID Extracts a sub-field from a string.
MOVE Copies contents of one field to another field.
PAD Adds characters to a field to fill it out.
PARSE Processes an MPCL data stream.
RIGHT Extracts the right-most characters from a string.
RSTRIP
TOKEN Extracts character-delimited sub-fields from a string.
TSTRIP Strips characters from a field based upon a template.
UPPER Converts characters in a field to upper-case.
Strips specified left-most characters from one field and copies
the remaining characters to another.
Strips specified right-most characters from one field and copies
the remaining characters to another.
VALIDATE Validates a check digit.
5-6 Command Reference
File Management Commands
APPVERSION Sets the script name and version number.
BSEARCH
QUERY
READ
SEEK Positions the current record within the lookup file.
Performs a binary search on a sorted lookup table for a record
containing a specific value.
Searches a lookup file to find a record containing a specific
value.
Copies the current record from the lookup file into the
appropriate working buffer.
Input/Output Commands
AUTOSTART Executes the script immediately after download is complete.
AVAILABLEDATA Checks the communications port for available data.
CLOSECOMM Closes the communications port.
DISABLE Turns off a particular hot key.
ENABLE Turns on a particular hot key.
FETCH
FIXDATA Defines fixed data for an input buffer.
Retrieves one character from the communications port and
places it in the input buffer.
GET Retrieves data from the communications port.
HOTKEY Defines a particular hot key.
LABELCOUNT Tracks the number of labels printed.
LOCATE
OPENCOMM Opens the communications port.
PRINT Prints the printer buffer's contents in the format specified.
RESTORESCREEN Re-displays the saved contents of the screen.
SAVESCREEN Saves the screen’s current contents.
Moves the cursor to a particular position on the printer’s
Screen.
Command Reference 5-7
ADD
Purpose Adds the numeric values of two fields.
Syntax ADD
Process The ADD command sums
buffer-field2
The
Rules: Both fields must be numeric.
The DEFINE command defines the index.
Optional Fields
Invalid
chapter.
buffer-field1
.
buffer-field
Buffer-field 1
INPUT Input Buffer
Logical Field Name (TEMP1) Temporary Buffer
Logical Field Name (LU1) Lookup Buffer Field
Logical Field Name (PR1) Printer Buffer Field
Logical Field Name (Field1) [Index] Array Buffer Field
Buffer-field1
and
valid labels
,
buffer-field2
fields can be one of the following:
and
2
only: Number prefixed by
are discussed in "Script Flow" at the beginning of this
[ , [
invalid label
buffer-field1
] [ ,
and
buffer-field2
Description
Field
the number sign (#)
valid label
and places the result into
] ]
Example 1
Example 2
See Also DEC
This example adds the contents of WHOLESALE to TEMP2. Control passes to the
next line.
ADD WHOLESALE,TEMP2
This example assigns TEMP1 the sum of CONTROL and TEMP1. If TEMP1
overflows, control passes to the invalid label *ERROR2. If TEMP1 does not
overflow, control passes to the next line.
ADD CONTROL,TEMP1,*ERROR2
INC
SUB
MULTIPLY
DIVIDE
5-8 Command Reference
Loading...
+ 90 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.