

ANSI C uses the caret character as the exclusive OR operator. This is done to be consistent with LabTalk. Note: Origin C, by default, treats the caret character as an exponentiate operator. Out_str ( "aa is greater than or equal to zero" ) Out_int ( "The remainder of 11 divided by 2 is ", 11 % 2 ) Comparison OperatorsĬomparison operators evaluate to true or false with true yielding 1 and false yielding 0. This operator can only be applied to integral operands. The modulus operator Modulus Operator calculates the remainder of the left operand divided by the right operand. Out_double ( "3/2 is ", 3 / 2 ) // output 1.5 #pragma numlittype (pop ) // set back to the default action of numlittype

Out_double ( "3/2 is ", 3 / 2 ) // output 1 #pragma numlittype (push, TRUE ) If you are using a QWERTY keyboard, the caret symbol should be located over. Use the pragma statement below before codes to make Origin C compiler to treat all numeric literals as double type. To define this type of sets you are going to use the metacharacter caret. #pragma xor (pop ) // set back to the default action of xorĭividing an integer by another integer will give an integer result by default. Out_int ( "10 raised to the 3rd is ", 10 ^ 3 )

You can force Origin C to treat the caret character as the exclusive OR operator by using a special pragma statement before your code. Note: Origin C, by default, treats the caret character Caret Character(^) as an exponentiate operator Exponentiate Operator. 4 Bitwise Operators AND Operator OR Operator XOR Operator.
