beautypg.com

AMT Datasouth PAL User Manual

Page 146

background image

ne

140

ne

Description

Compare two objects for inequality.

Usage

1Any 2Any

ne

Bool

1Any

Any. First object to compare. With the exception of integer, fixed-point, string,
and name objects, 1Any must have the same object type as 2Any. The operator
will compare integer and fixed-point objects in any combination. The operator
will also compare any combination of string and name objects.

2Any

Any. Second object to compare.

Bool

Boolean. A value of true indicates inequality. A value of false indicates equal-
ity.

Comments

PAL will compare for inequality any two objects of the same object type. PAL will also compare
any combination of integer and fixed-point objects, as well as any combination of string and name
objects.

PAL compares strings and names using the standard ASCII character sorting sequence including
case sensitivity. Therefore, the string (abc) does not match the string (ABC).

For composite objects, only if the two objects reference the exact same composite data does PAL
consider the objects equal. Therefore, the PAL sequence "[1 2 3] [1 2 3] ne" produces the result
"true". The sequence "[1 2 3] dup ne" produces the result "false".

In the first case, the sequence creates two unique arrays which happen to contain the same data.
Since the array objects reference different data within the printer's memory, the objects do not meet
PAL's condition for equality.

In the second case, the sequence creates a single array and a second reference to the same array
data. Since the array objects reference the same data with the printer's memory, the objects meet
PAL's condition for equality.

Hints

PAL uses the same conditions for equality and inequality for the eq and ne operators as it does
when comparing key values in dictionaries.