Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP! PROBLEM WITH CONSTANT RECORD DECLARATION!!!

31 views
Skip to first unread message

Amit Layman

unread,
Feb 17, 2004, 6:35:02 AM2/17/04
to
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


Jan Schnackenberg

unread,
Feb 17, 2004, 6:58:58 AM2/17/04
to
Hi

First: How about setting a Followup-to while crossposting to this many
newsgroups?

Second: Remove the last "," and the Structure will compile just fine.

Ciao, Jan

--
/"\ ASCII RIBBON PS2-Assistent
\ / CAMPAIGN Antworten bitte ausschliesslich an die Newsgroup
X AGAINST HTML Links zu Delphi und dem verhalten in Newsgroups:
/ \ IN MAIL AND NEWS ---> http://www.fh-wedel.de/~snb/ <---

feardotcom

unread,
Feb 19, 2004, 5:42:06 AM2/19/04
to

"Amit Layman" <amit...@hotmail.com> wrote in message
news:c0su90$5c3$1...@news.iucc.ac.il...
;
syntax is the root of all ev0l :)


0 new messages