Message 1 of 3
What is the difference between 'assignment' and 'equality' operators
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI
Learning max script with help of "Script help documentation"
In FAQ s came across this question
"What is the difference between 'assignment' and 'equality' operators'
While evaluating in listener and editor both codes give same result
not throwing any error in the first case when " if a = 0 " is written instead of " a ==0"
TYPICAL ERROR:
a = 1 if a = 0 then print "A is Zero!" else print "A is not Zero!" -- Type error: if-test requires BooleanClass, got: 0
CORRET CODE:
a = 1 if a == 0 then print "A is Zero!" else print "A is not Zero!" -->"A is not Zero!"