Amit Layman
2004-02-17 11:35:02 UTC
Hi!
I'm trying to define a constant record this way:
type
TPhoneme = record
phoneme: char;
features: array [1..13] of integer;
isvowel: boolean;
end;
TPhonemes = array [1..24] of TPhoneme;
const
PHONEMES: TPhonemes =
(
(phoneme: 'i'; features: ( 1, -1, 1, -1, -1, -1, -1, -1, 1, 0, 0, 0,
0 ); isvowel: true),
(phoneme: 'e'; features: ( 1, -1, -1, -1, -1, -1, -1, -1, 1, 0, 0, 0,
0 ); isvowel: true),
(phoneme: 'a'; features: ( 1, -1, -1, 1, 1, -1, -1, -1, 1, 0, 0, 0,
0 ); isvowel: true),
(phoneme: 'u'; features: ( 1, -1, 1, 1, -1, -1, -1, 1, -1, 0, 0, 0,
0 ); isvowel: true),
(phoneme: 'o'; features: ( 1, -1, -1, 1, -1, -1, -1, 1, 1, 0, 0, 0,
0 ); isvowel: true),
(phoneme: 'y'; features: (-1, -1, 1, -1, -1, -1, -1, -1, -1, 0, 0, 0,
0 ); isvowel: false),
(phoneme: 'r'; features: ( 1, 1, -1, -1, -1, -1, 1, 0, 0, 1,
1, -1, -1 ); isvowel: false),
(phoneme: 'l'; features: ( 1, 1, -1, -1, -1, 1, 1, 0, 0, 1,
1, -1, -1 ); isvowel: false),
(phoneme: 'h'; features: (-1, -1, -1, -1, 1, -1, -1, 0, 0, -1,
1, -1, -1 ); isvowel: false),
(phoneme: 'p'; features: (-1, 1, -1, -1, -1, 1, -1, 0,
0, -1, -1, -1, -1 ); isvowel: false),
(phoneme: 'b'; features: (-1, 1, -1, -1, -1, 1, -1, 0, 0,
1, -1, -1, -1 ); isvowel: false),
(phoneme: 't'; features: (-1, 1, -1, -1, -1, 1, 1, 0,
0, -1, -1, -1, -1 ); isvowel: false),
(phoneme: 'd'; features: (-1, 1, -1, -1, -1, 1, 1, 0, 0,
1, -1, -1, -1 ); isvowel: false),
(phoneme: 'k'; features: (-1, 1, 1, 1, -1, -1, -1, -1,
0, -1, -1, -1, -1 ); isvowel: false),
(phoneme: 'g'; features: (-1, 1, 1, 1, -1, -1, -1, -1, 0,
1, -1, -1, -1 ); isvowel: false),
(phoneme: 'f'; features: (-1, 1, -1, -1, -1, 1, -1, 0, 0, -1, 1, -1,
1 ); isvowel: false),
(phoneme: 'v'; features: (-1, 1, -1, -1, -1, 1, -1, 0, 0, 1, 1, -1,
1 ); isvowel: false),
(phoneme: 'z'; features: (-1, 1, -1, -1, -1, 1, 1, 0, 0, 1, 1, -1,
1 ); isvowel: false),
(phoneme: 's'; features: (-1, 1, -1, -1, -1, 1, 1, 0, 0, -1, 1, -1,
1 ); isvowel: false),
(phoneme: 'S'; features: (-1, 1, 1, -1, -1, -1, 1, 0, 0, -1, 1, -1,
1 ); isvowel: false),
(phoneme: 'm'; features: (-1, 1, -1, -1, -1, 1, -1, 0, 0, 1, -1,
1, -1 ); isvowel: false),
(phoneme: 'n'; features: (-1, 1, -1, -1, -1, 1, 1, 0, 0, 1, -1,
1, -1 ); isvowel: false),
(phoneme: 'c'; features: (-1, 1, -1, -1, -1, 1, 1, 0, 0, -1,
1, -1, -1 ); isvowel: false),
(phoneme: 'x'; features: (-1, 1, 1, -1, -1, -1, -1, 0, 0, -1, 1, -1,
1 ); isvowel: false),
);
This wouldn't compile. What's wrong?
THANKS A LOT!!!
Amit
I'm trying to define a constant record this way:
type
TPhoneme = record
phoneme: char;
features: array [1..13] of integer;
isvowel: boolean;
end;
TPhonemes = array [1..24] of TPhoneme;
const
PHONEMES: TPhonemes =
(
(phoneme: 'i'; features: ( 1, -1, 1, -1, -1, -1, -1, -1, 1, 0, 0, 0,
0 ); isvowel: true),
(phoneme: 'e'; features: ( 1, -1, -1, -1, -1, -1, -1, -1, 1, 0, 0, 0,
0 ); isvowel: true),
(phoneme: 'a'; features: ( 1, -1, -1, 1, 1, -1, -1, -1, 1, 0, 0, 0,
0 ); isvowel: true),
(phoneme: 'u'; features: ( 1, -1, 1, 1, -1, -1, -1, 1, -1, 0, 0, 0,
0 ); isvowel: true),
(phoneme: 'o'; features: ( 1, -1, -1, 1, -1, -1, -1, 1, 1, 0, 0, 0,
0 ); isvowel: true),
(phoneme: 'y'; features: (-1, -1, 1, -1, -1, -1, -1, -1, -1, 0, 0, 0,
0 ); isvowel: false),
(phoneme: 'r'; features: ( 1, 1, -1, -1, -1, -1, 1, 0, 0, 1,
1, -1, -1 ); isvowel: false),
(phoneme: 'l'; features: ( 1, 1, -1, -1, -1, 1, 1, 0, 0, 1,
1, -1, -1 ); isvowel: false),
(phoneme: 'h'; features: (-1, -1, -1, -1, 1, -1, -1, 0, 0, -1,
1, -1, -1 ); isvowel: false),
(phoneme: 'p'; features: (-1, 1, -1, -1, -1, 1, -1, 0,
0, -1, -1, -1, -1 ); isvowel: false),
(phoneme: 'b'; features: (-1, 1, -1, -1, -1, 1, -1, 0, 0,
1, -1, -1, -1 ); isvowel: false),
(phoneme: 't'; features: (-1, 1, -1, -1, -1, 1, 1, 0,
0, -1, -1, -1, -1 ); isvowel: false),
(phoneme: 'd'; features: (-1, 1, -1, -1, -1, 1, 1, 0, 0,
1, -1, -1, -1 ); isvowel: false),
(phoneme: 'k'; features: (-1, 1, 1, 1, -1, -1, -1, -1,
0, -1, -1, -1, -1 ); isvowel: false),
(phoneme: 'g'; features: (-1, 1, 1, 1, -1, -1, -1, -1, 0,
1, -1, -1, -1 ); isvowel: false),
(phoneme: 'f'; features: (-1, 1, -1, -1, -1, 1, -1, 0, 0, -1, 1, -1,
1 ); isvowel: false),
(phoneme: 'v'; features: (-1, 1, -1, -1, -1, 1, -1, 0, 0, 1, 1, -1,
1 ); isvowel: false),
(phoneme: 'z'; features: (-1, 1, -1, -1, -1, 1, 1, 0, 0, 1, 1, -1,
1 ); isvowel: false),
(phoneme: 's'; features: (-1, 1, -1, -1, -1, 1, 1, 0, 0, -1, 1, -1,
1 ); isvowel: false),
(phoneme: 'S'; features: (-1, 1, 1, -1, -1, -1, 1, 0, 0, -1, 1, -1,
1 ); isvowel: false),
(phoneme: 'm'; features: (-1, 1, -1, -1, -1, 1, -1, 0, 0, 1, -1,
1, -1 ); isvowel: false),
(phoneme: 'n'; features: (-1, 1, -1, -1, -1, 1, 1, 0, 0, 1, -1,
1, -1 ); isvowel: false),
(phoneme: 'c'; features: (-1, 1, -1, -1, -1, 1, 1, 0, 0, -1,
1, -1, -1 ); isvowel: false),
(phoneme: 'x'; features: (-1, 1, 1, -1, -1, -1, -1, 0, 0, -1, 1, -1,
1 ); isvowel: false),
);
This wouldn't compile. What's wrong?
THANKS A LOT!!!
Amit