Seb McClouth wrote:......I have a tiny more question in C, does & and && mean the same or is there a diffrence? If so, what are there equivalents in Qbasic? ...
More examples of cryptic crap in C.
BEWARE! The & and && operators mean different things in different versions/dialects of C. I have several manuals, so I'll only give you the meaning from the C White Book.
& means "the address of". It is generally needed by some C built-in functions like scanf, and appears like: &variablename.
Another example:
px = &x;
This assigns the address of x to the variable px. px is now said to "point to" x.
& is also a bitwise AND operator.
Example:
c = n & 7;
which sets to zero all but the low-order 3 bits of n.
&& is a logical AND operator.
Can't find a decent example in the book, but it would be like substituting && for AND in the following QB statement:
if a = 0 AND b < 100 then....
Similarly,
| is a bitwise inclusive OR operator.
|| is a logical OR operator.
^ is a bitwise exclusive OR operator.
BTW, there are about another 27 of these operators using special characters.
Reading this C manual again opens up old wounds. I strongly suggest you get a copy of the C manual for the C code that you're working with.
Good luck!
*****