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
Subject: [fpc-pascal] Copying a Pchar to an array of bytes I'm not too familiar with Pchar, and apparently I'm missing something. I have a Pchar string which I must copy into an array of bytes. Could someone explain me while a move doesn't work while an assignment byte by byte

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

2020-05-19 Thread Giuliano Colla
I'm not too familiar with Pchar, and apparently I'm missing something. I have a Pchar string which I must copy into an array of bytes. Could someone explain me while a move doesn't work while an assignment byte by byte does? Here's a snippet of the code: buffer: array [0..1023] of byte; Hell