On 08.01.2017 13:01, Ryan Joseph wrote: > >> On Jan 8, 2017, at 6:55 PM, Ryan Joseph <r...@thealchemistguild.com> wrote: >> >> why am I getting this error? Operator is not overloaded: "Double" mod >> “LongInt”. Mod can’t be used with double and integers like in C? > > > Sorry for the repeat. Same error here but "Operator is not overloaded: > "Double" and “Byte””. This worked in c as "xi = x & 255" > > x: double; > xi: integer; > > xi := x and 255;
If you look at the C# code again you'll see this: === code begin === xi = (int)x & 255; === code end === Including the information contained in the comment on the right I'd say it should be this: === code begin === xi := Floor(x) and 255; === code end === (Floor() is from unit Math) Regards, Sven _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal