|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
syntax in c???
does the symbol % represent remainder as in java ????
thnx rockie team |
|
#2
|
||||||
|
||||||
|
Re: syntax in c???
yes.
|
|
#3
|
|||||
|
|||||
|
Re: syntax in c???
% is usually called the "mod" or "modulus" operator, but that means the same thing as remainder.
A couple of things to be careful of. The behavior of % with negative operands is not standardized. In Code:
( a % b ) The order of precedence of '%' is the same as for '*' and '/', which is higher than for '+' and '-'. So Code:
( ii + 16 % 8 ) Code:
(ii + 0) Code:
(ii) Code:
( (ii+16) % 8 ) -norm |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| BS2 syntax (PBASIC) on the new controllers? Maybe! | Jeremy_Mc | Programming | 0 | 25-10-2003 15:00 |
| PBASIC Syntax Question | Raven_Writer | Programming | 4 | 20-08-2003 08:07 |
| PBASIC language syntax | WizardOfAz | Programming | 14 | 30-04-2003 10:23 |
| Pbasic 2.5 syntax | Rickertsen2 | Programming | 10 | 15-02-2003 08:56 |
| UltraEdit Syntax Highlighting | Jeff McCune | Programming | 9 | 19-01-2003 20:08 |