Operators

Arithmetic Operators

Tibbo BASIC

+

-

*

/

mod


Tibbo C

+

-

*

/

%



Tibbo BASIC
Tibbo C
x=y mod 2 'modulus operation, i.e. 5 mod 2 = 1
x=y % 2;

String Operators

Tibbo BASIC

+


Tibbo C

+


Here, "+" means concatenation:


Tibbo BASIC
Tibbo C:
dim s as string="TIBBO"
s=s+" TECHNOLOGY" 'concatenation
string s="TIBBO";
s=s+" TECHNOLOGY"; //concatenation

Relational and Logic Operators

Used in conditional expressions, which in turn are used in control structures.

Tibbo BASIC

>

>=

<

<=

=

<>

and

or


Tibbo C

>

>=

<

<=

==

!=

&&

||



Tibbo BASIC:
Tibbo C:
if x=0 and s<>"ABC" then...
if(x==0 && s!="ABC"){...

Increment and Decrement Operators (Tibbo C Only)

Tibbo C

++

--



Tibbo C
x++;
--x;

Bitwise Operators

Tibbo BASIC

and

or

xor

shl

shr

not


Tibbo C

&

|

^

<<

>>

~



Tibbo BASIC
Tibbo C
x=y and z
x=y or z
x=y xor z
x=y shl 2 'shift contents of y left by 2 bits
x=y shr z 'shift contents of y right by z number of bits
x=not y 
x=y & z;
x=y | z;
x=y ^ z;
x=y << 2;
x=y >> z;
x= ~ y;

Assignment Operators (Tibbo C Only)

Tibbo C

+=

-=

*=

/=

%=

<<=

>>=

&=

|=

^=


Tibbo C
x*=2;
y<<=z; //shift contents of y left by z number of bits

Operators

Arithmetic Operators

String Operators

Relational and Logic Operators

Increment and Decrement Operators (Tibbo C Only)

Bitwise Operators

Assignment Operators (Tibbo C Only)