MAX operator
kawin
Posts: 2
Hello all,
1. i just wondering how Basic Stamp "MAX" operator work?
For example, MAX 99 if the value is more than 99, is there any error display or it returns 99?
2. I would like to use it with CCS PIC, can i write it conditinally using if..else?
Thank you so much.
1. i just wondering how Basic Stamp "MAX" operator work?
For example, MAX 99 if the value is more than 99, is there any error display or it returns 99?
2. I would like to use it with CCS PIC, can i write it conditinally using if..else?
Thank you so much.
Comments
X = Y MAX Z
This sets X to the lowest value of either Y or Z. It's normally used to limit the value of Y to be no more than the value of Z.
X = Y MIN Z
This sets X to the highest value of either Y or Z. It's normally used to limit the value of Y to be no less than the value of Z.
Regarding CCS PIC. You'll have to look at their manual.