Re: [fpc-pascal] Conversion from C to Pascal - Left bit shift

2021-09-03 Thread Jean SUZINEAU via fpc-pascal
I made a few tests on Ubuntu 64 bits (arch x86_64) with variations on a small test program: var    E2: Byte= 3;    E1: LongWord= 1;    E: QWord; begin E:= (1000*E1) shl E2; writeln( 'E2', E2); writeln( 'E1', E1); writeln( 'E', E); end. In the assembly window, shl is computed

Re: [fpc-pascal] Hello, new Pascal programmer. had a question!

2021-09-03 Thread Peter via fpc-pascal
Sorry, my bad. I hadn't got Thunderbird configured right. All mail from this list just showed the list address in the 'From' field. Now fixed it.  Edit > Preferences > Advanced > "Show only display name for people in my address book" which was checked. Cheers, Pete ___

Re: [fpc-pascal] Conversion from C to Pascal - Left bit shift

2021-09-03 Thread LacaK via fpc-pascal
Can we say that in Pascal the result of:    E1 shl E2 is of same type as E1 ? (so if E1 is LongWord then result is LongWord also?) What if there is an expression on left side:    (E1*x) shl E2 Will E1*x promote to 64 bits (on 64 bit target)? See documentation on a

Re: [fpc-pascal] Conversion from C to Pascal - Left bit shift

2021-09-03 Thread Christo Crause via fpc-pascal
On Fri, Sep 3, 2021 at 8:02 AM LacaK via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > Can we say that in Pascal the result of: >E1 shl E2 > is of same type as E1 ? > (so if E1 is LongWord then result is LongWord also?) > > What if there is an expression on left side: >(E1*x) shl