The last statement before else should not have a semicolon. The error
message explicitly states that. Remove the semicolon before else and
everything will be fine
----- Original Message -----
From: "Rohit Gupta" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, June 28, 2001 02:13 PM
Subject: Re: [DUG]: if case else
> The first case needs a matching end
>
> ----- Original Message -----
> From: "Ross Levis" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> Sent: Thursday, 28 June 2001 15:52
> Subject: [DUG]: if case else
>
>
> > Thanks all for the TimeSeparater help. OnCreateForm will do the trick.
> >
> > I have another beginners question. The following generates the compiler
> > error ' ; not allowed before ELSE'. I can get around the problem but I
> > don't think I should have to! Does it say somewhere that a Case
> > statement can't be in a If..Begin..End block?
> >
> > if InputIsCDG then
> > begin
> > case WriteRadioGroup.itemindex of
> > 0: BINbuffer := EmptyWAV;
> > 1: BINbuffer := CDGbuffer;
> > 2: BINbuffer := EmptyWAV+CDGbuffer;
> > end;
> > else
> > case WriteRadioGroup.itemindex of
> > 0: BINbuffer := copy(CDGbuffer,1,2352);
> > 1: BINbuffer := copy(CDGbuffer,2353,96);
> > 2: BINbuffer := CDGbuffer;
> > end;
> > end;
> >
> > Cheers,
> > Ross.
> >
> >
>
> --------------------------------------------------------------------------
> -
> > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> >
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"