Skip to content

Ne Comparison Mode

Obsolete

For Boolean comparisons, you should use the < and > symbols inside a Boolean expression.

Example

This is obsolete:

If iCount NE 10

This is correct:

If (iCount < > 10)

See Also

Purpose

To specify "not equal to" as the operator for comparisons.

Syntax

Commands and loops can be controlled according to the results of comparisons of the values of two variables using the ne operator:

indicate
    indicator
    as variable
    ne variable

See Indicate Command for a description of that command.

if variable ne variable
    command

See If Command for a description of that command.

repeat
    command
    :
    command
until variable ne variable

See Repeat Command for a description of that command.

while variable ne variable
    command
    :
    command
end

See While Command for a description of that command.

Notes

  • ne is case sensitive. Thus, the following comparison would be true:

    if "aBC" ne "ABC" . . .
    
  • For the if, indicate, until, and while commands, DataFlex uses eight Comparison Mode operators: eq, ge, gt, in, le, lt, ne, and match. The in and match operators operate according to the character contents of variables, while the other operators deal in numeric quantities and sequences.