[fpc-pascal] C# translatation
skalogryz.lists at gmail.com
Sun Jan 8 18:30:36 CET 2017
On Sun, Jan 8, 2017 at 12:22 PM, Sven Barth <pascaldragon at googlemail.com>
> The closest equivalence to bitwise and in Pascal is bitwise and.
> The operators "and", "or", "xor" and "not" are logical or bitwise
> depending on their arguments.
With that said...
On Sun, Jan 8, 2017 at 11:46 AM, José Mejuto <joshyfun at gmail.com> wrote:
> Both work the same way but pascal does not have the assignment and testing
> mess that can be written in C like:
> C / C++:
> a = b && c;
> a := (b<>0) and (c<>0);
There's another approach to resolved that.
The following code works as expected
b,c : integer;
a : Boolean;
ai : integer;
ai:=b and c;
a:=boolean(b) and boolean(c);
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal