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 array found > > Is it illegal to specify a dynamic array as the result type of a > function?
No, but you cannot declare it inline, just like you cannot have function read(count: cardinal): record b: byte end; Use a separately defined type: type tbytearray = array of byte; Jonas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal