bernie_zhao
14 years agoVisitor
object comparison
Hi I'm a newbie to Roku.
A very basic question, how do you compare two objects.
Obviously I didn't expect the following not work
a={ a1:"ok" }
b={ b1:"ok2" }
c = a
if a=c then ' this line generates "Type Mismatch"
endif
In debug console, I tried ?a=b or ?a<>b, both generate same type mismatch error.
In Roku SDK it says objects are assigned by reference, which leads me to naturally believe object comparison is same as other languages such as java, javascript, c#...etc.
Any help is appreciated!
A very basic question, how do you compare two objects.
Obviously I didn't expect the following not work
a={ a1:"ok" }
b={ b1:"ok2" }
c = a
if a=c then ' this line generates "Type Mismatch"
endif
In debug console, I tried ?a=b or ?a<>b, both generate same type mismatch error.
In Roku SDK it says objects are assigned by reference, which leads me to naturally believe object comparison is same as other languages such as java, javascript, c#...etc.
Any help is appreciated!