<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 20 Nov 1985 19:01:19 GMT
From   : david moews <moews_b%h-sc1.uucp@BRL.ARPA>
Subject: Re: Turbo Pascal Version 3.00

In article <2258@umcp-cs.UUCP> Stanley Dunn writes:

> procedure proca(chita:char); forward;
> procedure procb(chitb:char);
> begin
>      writeln('Entering procb with a ',chitb);
>      proca('A');
>      writeln('Leaving procb with a ',chitb);
> end;
> procedure proca;
> begin
>      writeln('Entering proca with a ',chita);
>      if chita = 'I' then procb('I');
>      writeln('Leaving proca with a ',chita);
> end;
> begin
>      proca('I');
> end.
> The output using Turbo Pascal [under CP/M-80] was:
>      Entering proca with a I
>      Entering procb with a I
>      Entering proca with a A
>      Leaving proca with a A
>      Leaving procb with a I
>      Leaving proca with a A
 
   I don't know about Release 3.00, but in Release 2.00 of Turbo Pascal
running under CP/M-80, you must compile recursive procedures and functions
with the {$A-} option for them to work.  Putting a {$A-} line before
the line 'procedure proca(chita:char); forward;' will probably fix this 
problem.   

    David Moews     moews_b%h-sc1@harvard.arpa   ...!harvard!h-sc1!moews_b
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>