Is (operator)

From NSB App Studio
Revision as of 13:34, 5 July 2012 by Brendon (talk | contribs) (Created page with "''result'' = ''object1'' IS ''object2'' '''Description''' IS returns a boolean specifying if one object reference is identical to another. The required components, ''object1...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

result = object1 IS object2

Description

IS returns a boolean specifying if one object reference is identical to another. The required components, object1 and object2 are two object references.

Example

REM IS Example
DIM Obj1,Obj2
Obj1 = Array("Lovelace","Hopper","Allen")
SET Obj2 = Obj1
CompareObjects Obj1, Obj2
SET Obj2 = NOTHING
CompareObjects Obj1, Obj2
missing=6
notmissing=7
CompareObjects missing, notmissing
SUB CompareObjects(Ob1, Ob2)
  IF Ob1 IS Ob2 THEN
    PRINT "Same"
  ELSE
    PRINT "Different"
  END IF
END SUB

Output

Same
Different

Related Items

ADDOBJECT, SET