Mirsad Todorovac wrote:
On Sat, 8 Dec 2001, Frank Heckenbach wrote:
Mirsad Todorovac wrote:
Yes, I've thought about this when I translated the MD5 unit for GPC. Currently it does (left) rotation as (w shl s) or (w shr (32 - s)) (which is translated from similar C code).
The backend seems to have support for rotation, so it might be easy to add it in GPC (I haven't checked yet, but it appears so).
If we do it, I think it should not be operators (because that would change the syntax more than necessary), but rather simple predefines functions (`RotateLeft', `RotateRight'?).
On the other hand, it belongs to the same family of operations as ``shl'' and ``shr'', doesn't it?
And it's quite doubtful whether they should have been operators (Borland's decision) ...
Other operations like `Inc', `Dec' (also Borland extensions, incidentally) are also functions syntactically.
Since rotation is probably not used that much, I'd still prefer functions, even if it looks a little strange in the few cases, because it doesn't affect programs that use identifiers `ror' and `rol'.
Frank