Skip to content

Instantly share code, notes, and snippets.

@jpluimers
Created March 5, 2017 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpluimers/3be0992effa56b59465513faf3a15ed0 to your computer and use it in GitHub Desktop.
Save jpluimers/3be0992effa56b59465513faf3a15ed0 to your computer and use it in GitHub Desktop.
Translated from French post by Paul TOTH https://plus.google.com/+PaulTOTH/posts/eRCT9VZFwx7
type
TElement = record
Idx : Integer;
Valeurs: TArray<Integer>;
end;
TElements = TArray<TElement>;
const
El1 : TElement = (Idx: 1; Valeurs: [1]); // ok
Elements1 : array[0..0] of TElement = ((Idx: 1; Valeurs: [1])); // ok
Elements2 : TElements = []; // ok
Elements3 : TElements = [El1]; // E2026 Constant expression expected
Elements4 : TElements = [(Idx: 1; Valeurs: [1])]; // E2003: Undeclared identifier: 'Idx'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment