03.01.2019 15:45, Mattias Gaertner via fpc-pascal пишет:
On Thu, 3 Jan 2019 14:58:00 +0300
Alexander Shishkin via fpc-pascal
wrote:
[...]
This is OK (both T and U are integer):
generic TMyRecord1 = record end;
That is inconsistent to normal Pascal arguments.
Name[, Name ...][:type]
Isn
03.01.2019 6:32, Ryan Joseph пишет:
On Jan 2, 2019, at 8:25 PM, Alexander Shishkin via fpc-pascal
wrote:
This is not consistent with constraints. Should be ";" after T.
And what about following examples?
The semicolon is only needed following a generic parameter which is
c
03.01.2019 4:29, Ryan Joseph пишет:
type
generic TMyRecord_Int = record
end;
This is not consistent with constraints. Should be ";" after T.
And what about following examples?
type
generic TMyRecord1 = record
end;
type
generic TMyRecord2 = record
var data: array[0..U] of T; end;
generic TList4 = class
var data: array[0..U] of T; end;
03.01.2019 2:15, Sven Barth via fpc-pascal пишет:
Am Mi., 2. Jan. 2019, 23:41 hat Alexander Shishkin via fpc-pascal
<mailto:fpc-pascal@lists.freepascal.org>> geschrieben:
06.11.
06.11.2018 10:13, Ryan Joseph пишет:
program generic_constants;
type
generic TList = record
list: array[0..U-1] of T;
function capacity: integer;
end;
I`d like to see constant parameter to be constrained with type
type
generic TList =