Is (operator): Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 18: Line 18:
CompareObjects missing, notmissing
CompareObjects missing, notmissing
Sub CompareObjects(Ob1, Ob2)
Sub CompareObjects(Ob1, Ob2)
   If Ob1 IS Ob2 THEN
   If Ob1 IS Ob2 Then
     Print "Same"
     Print "Same"
   Else
   Else

Revision as of 01:43, 17 August 2012

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