sintassi con turbo pascal 1.1 su mac

 

program ARCHIVIO;
type
  date=record
              giorno:integer;
              mese:string;
              anno:1900..1999;
           end;
  altezze=record
                  metri:0..2;
                  cm:0..99;
                 end;
                  
  persone=record
                   cognome:string;
                   altezza:altezze;
                   peso:integer;
                   sesso:(M,F);
                   data:date;
                  end;
 var
   persona:persone;
   
 procedure leggir2(var persona:persone);
   begin
    WITH PERSONA DO
    BEGIN
    write('nominativo....................');
    readln(cognome);
    WITH ALTEZZA DO
    BEGIN
    write('altezza in metri.............');
    readln(metri);
    write('altezza in centimetri.....');
    readln(cm);
    END;
    write('peso in kg......................');
    readln(peso);
    WITH DATA DO
    BEGIN
    write('giorno nascita :numero.........');
    readln(giorno);
    write('mese nascita...nome......');
    readln(mese);
    write('anno nascita....numero.......');
    readln(anno);
   end;
   END;
   END;
   
   begin
     leggiR2(persona);
     clearscreen;
     writeln('-------------------------------------');
     writeln('stampa dati per singola persona');
     writeln('--------------------------------------');
     WITH PERSONA DO
      BEGIN
        writeln('nome...................',cognome);
         WITH ALTEZZA DO
         BEGIN
        writeln('altezza metri.....',metri);
        writeln('altezza cm.........',cm);
        END;
        WITH DATA DO
        BEGIN
        writeln('giorno nascita...',giorno);
        writeln('mese nascita.....',mese);
        writeln('anno nascita......',anno);
        END;
        writeln('peso in Kg..........',persona.peso);
        END;
        writeln('------------------------------------');
        writeln('premi return per finire ');
        readln;
  end.      
       
    
   
                                 

program campo;
type
  date=record
              giorno:integer;
              mese:string;
              anno:1900..1999;
           end;
  altezze=record
                  metri:0..2;
                  cm:0..99;
                 end;
                  
  persone=record
                   cognome:string;
                   altezza:altezze;
                   peso:integer;
                   sesso:(M,F);
                   data:date;
                  end;
 var
   persona:persone;
   
 procedure leggir2(var persona:persone);
   begin
    writeln('richiesta dati per singola persona');
    writeln;
    write('nominativo....................');
    readln(persona.cognome);
    write('altezza in metri.............');
    readln(persona.altezza.metri);
    write('altezza in centimetri.....');
    readln(persona.altezza.cm);
    write('peso in kg......................');
    readln(persona.peso);
    write('giorno nascita :numero.........');
    readln(persona.data.giorno);
    write('mese nascita...nome......');
    readln(persona.data.mese);
    write('anno nascita....numero.......');
    readln(persona.data.anno);
   end;
   
   begin
     leggiR2(persona);
     clearscreen;
     writeln('-------------------------------------');
     writeln('stampa dati per singola persona');
     writeln('--------------------------------------');
        writeln('nome...................',persona.cognome);
        writeln('altezza metri.....',persona.altezza.metri);
        writeln('altezza cm.........',persona.altezza.cm);
        writeln('giorno nascita...',persona.data.giorno);
        writeln('mese nascita.....',persona.data.mese);
        writeln('anno nascita......',persona.data.anno);
        writeln('peso in Kg..........',persona.peso);
        writeln('------------------------------------');
        writeln('premi return per finire ');
        readln;
  end.      
       
    

program enumera;
type 
  des1=(O,AS,AT,AMUS,ATIS,ANT);
  des2=(ABAM,ABAS,ABAT,ABAMUS,ABATIS,ABANT);
var
  D1:des1;
  D2:des2;
  D3:(abo,abis,abit,abimus,abitis,abunt);
  testo:string;
  
begin
  testo:='testo stringa';
  for d1:=O to ant do
   begin
    case D1 of
      O:writeln(testo);
      as:writeln(testo);
      at:writeln(testo);
      amus:writeln(testo);
      atis:writeln(testo);
      ant:writeln(testo);
     end; 
end;
    writeln('-------------------');
   for d2:=abam to abat do
     begin
       case d2 of
         abam:writeln(testo);
         abat:writeln(testo);
       end;
     end;
     writeln('-----------------');   
     for d3:=abo to abis do
      begin
        case d3 of
          abo:writeln(testo);
          abis:writeln(testo);
        end;
       end;
       writeln('premi return');
       readln;   
end.