OPERATORS

Exact equality (==)

Compare for exact equality.

Syntax

Signature
left == right

Description

Compare for exact equality. Two strings must contain the same bytes in the same order, including trailing spaces.

Example

Exact_equality.prg
PROCEDURE Main()

   LOCAL cExpected := "A-17"
   LOCAL cScan

   FOR EACH cScan IN { "A-17", "a-17", "A-17 ", "A-170" }
      IF cScan == cExpected
         QOut( "Match", cScan )
      ELSE
         QOut( "Review scan [" + cScan + "]" )
      ENDIF
   NEXT

   RETURN

Output