Re: [fpc-pascal] Copying a Pchar to an array of bytes

2020-05-24 Thread Bo Berglund via fpc-pascal
On Tue, 19 May 2020 19:22:55 +0200, Luca Olivetti wrote: >Move(Hello^,buffer,len) or: Move(Hello[0],buffer,len); -- Bo Berglund Developer in Sweden ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/ma

Re: [fpc-pascal] Copying a Pchar to an array of bytes

2020-05-19 Thread Luca Olivetti
El 19/5/20 a les 19:05, Giuliano Colla ha escrit: Move(Hello,buffer,len); <--- Garbage in buffer - doesn't work Move(Hello^,buffer,len) Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailm

Re: [fpc-pascal] Copying a Pchar to an array of bytes

2020-05-19 Thread Giuliano Colla
Thank you both guys. Il 19/05/2020 19:28, Alexander Grotewohl ha scritto: do move(Hello^, ... -- Do not do to others as you would have them do to you.They might have different tastes. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org htt

Re: [fpc-pascal] Copying a Pchar to an array of bytes

2020-05-19 Thread Alexander Grotewohl
I believe pchar has special treatment where pchar[i] is the same as pchar^[i] do move(Hello^, ... -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Giuliano Colla Sent: Tuesday, May 19, 2020 1:05:54 PM To: FPC-Pascal users discussions S