docs.roxen.comView this page in a printer friendly mode
DocsPike7.0TutorialExpressions
Copyright © 2012, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com

   

Some Terminology
Arithmetical Operations
Operations on Complex Types
Comparison
Logical Expressions
Bitwise Operations
Operations on Sets
Indexing
Assignment
Type Conversions
The Comma Operator
Call and Splice
Operator Precedence and Associativity

Bitwise Operations

In the rare cases where you have to fiddle with the bits inside integers, you can use the bitwise operations in Pike. They work just like in C and C++, and if you need to use them, you probably already know what they mean.

OperationSyntax

Shift left

a << b

Shift right

a >> b

Bitwise not

~ a

Bitwise and

a & b

Bitwise or

a | b

Bitwise exclusive or

a ^ b