className = 'User.NativeTest'
comment = ".cmBoolean() tests whether arguments 2 and 3 are equal: "
boolVal = irispy.classMethodBoolean(className,'cmBoolean',2,3)
print(className + comment + str(boolVal))
comment = ".cmBytes returns integer arguments 72,105,33 as a byte array (string value 'Hi!'): "
byteVal = irispy.classMethodBytes(className,'cmBytes',72,105,33) #ASCI 'Hi!'
print(className + comment + str(byteVal))
comment = ".cmString() concatenates 'Hello' with argument string 'World': "
stringVal = irispy.classMethodString(className,'cmString','World')
print(className + comment + stringVal)
comment = ".cmLong() returns the sum of arguments 7+8: "
longVal = irispy.classMethodInteger(className,'cmLong',7,8)
print(className + comment + str(longVal))
comment = ".cmDouble() multiplies argument 4.5 by 1.5: "
doubleVal = irispy.classMethodFloat(className,'cmDouble',4.5)
print(className + comment + str(doubleVal))
comment = ".cmList() returns a $LIST containing arguments 'The answer is ' and 42: "
listVal = irispy.classMethodIRISList(className,"cmList","The answer is ",42);
print(className + comment+listVal.get(1)+str(listVal.get(2)))
comment = ".cmVoid assigns argument value 75 to global node ^cmGlobal: "
try:
irispy.kill('cmGlobal') # delete ^cmGlobal if it exists
irispy.classMethodVoid(className,'cmVoid',75)
nodeVal = irispy.get('cmGlobal'); #get current value of ^cmGlobal
except:
nodeVal = 'FAIL'
print(className + comment + str(nodeVal))