Hi Thanks for the prompt and detailed reply.
Below is a copy of program with errors removed.
Noteable: 1. a var declaration is required before a type declaration. 2. later on, the varible just declared really isn't needed. in this case a "new(ptrline, length( Aline ))" works just as well.
There may be several ways you could redesign gpc to remove the var requirement. One way would be to allow a dummy varible in a type declaration so new() would know there is more than one item.
Russ
unit Buff; interface
const MAXLINES = 20000;
type lline = string ( 4000 );
procedure BB_AddLine( Aline: lline ); {adds to end}
implementation var cap : integer;
type ptrline = ^Line; Line = string ( cap );
TbbArray = array[1..MAXLINES] of ptrline;
var BigBuffer : Tbbarray; {array of pointers to data} LineCount : integer = 0;
procedure BB_AddLine( Aline: lline ); begin inc( LineCount ); cap := length( Aline ); BigBuffer[ LineCount ] := new( ptrline, cap ); BigBuffer[ LineCount ]^ := Aline; end; end.