🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.lang.pascal
3 messages
3 total messages Started by Amit Layman Tue, 17 Feb 2004 11:35
HELP! PROBLEM WITH CONSTANT RECORD DECLARATION!!!
#1
Author: Amit Layman
Date: Tue, 17 Feb 2004 11:35
71 lines
4399 bytes
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
Re: HELP! PROBLEM WITH CONSTANT RECORD DECLARATION!!!
#2
Author: Jan Schnackenberg
Date: Tue, 17 Feb 2004 11:58
14 lines
2332 bytes
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/ <---
Re: HELP! PROBLEM WITH CONSTANT RECORD DECLARATION!!!
#3
Author: feardotcom
Date: Thu, 19 Feb 2004 10:42
87 lines
4834 bytes
"Amit Layman" <amitlay77@hotmail.com> wrote in message
news:c0su90$5c3$1@news.iucc.ac.il...
> 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
>
>
;
syntax is the root of all ev0l :)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads