Re: [fpc-pascal] Dynamic array as result of class method?

2010-11-07 Thread Wimpie Nortje
TByteDynArray is defined in unit 'types' On 2010/11/07 12:23 PM, Jonas Maebe wrote: > > On 07 Nov 2010, at 11:05, Bo Berglund wrote: > >>function Read(Count: Cardinal): array of byte; overload; >> end; >> >> But when I use the Ctrl-Shift-C command on this to make Lazarus >> complete the cod

Re: [fpc-pascal] Dynamic array as result of class method?

2010-11-07 Thread Jonas Maebe
On 07 Nov 2010, at 11:05, Bo Berglund wrote: >function Read(Count: Cardinal): array of byte; overload; > end; > > But when I use the Ctrl-Shift-C command on this to make Lazarus > complete the code I get an error on the second Read line: > sscomm.pas(40,37) Error: identifier expected, but a

[fpc-pascal] Dynamic array as result of class method?

2010-11-07 Thread Bo Berglund
I am trying to design a buffer handling class where I want to have a read function, which should return a result in the form of a byte array of varying length. Something like this: TBufHandler = class private FBuf: array of byte; FBufSize: Cardinal; FWriteIndex: Cardinal; FRead