Pointer in Delphi is one of the things that I'm not
so sure about anytime I use one.

Suppose I have a data buffer, and I'd like to copy
byte 10 to 20 of the data buffer to a string. What
is the best way to do it?

var Buf: Array [0..65535] of Byte; s: String;
begin
  // modify value in buf
  ...

  // How to copy Buf[9..19] to String s?
  s := Copy(Buf, 9, 10); // this gets an "Incompatible types" error

  // Use s here
  ...
end;

-- 
Best regards,
Jack

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to