Ross
Always ensure that there is a never a semi colon immediately before an
'else' part of a statement.
ie just delete the ';' after your first 'end' statement.
Mark
----- Original Message -----
From: "Ross Levis" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, June 28, 2001 3:52 PM
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"