Guest User

Untitled

a guest
May 14th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.93 KB | None | 0 0
  1. with Ada.Text_IO;
  2. use Ada;
  3.  
  4. procedure Visuelle_Kryptographie is
  5.  
  6.    Datei_1, Datei_2 : Text_IO.File_Type;
  7.  
  8.    type Listenelement;
  9.    type Zeiger is access Listenelement;
  10.  
  11.    type Listenelement is record
  12.       Inhalt : String (1 .. 1);
  13.       Naechstes : Zeiger;
  14.    end record;
  15.  
  16.    Liste_1, Aktuell : Zeiger;
  17.    Liste_2 : Zeiger;
  18.  
  19.  begin  
  20.    
  21.    Text_IO.Open (Datei_1, Text_IO.In_File, "vc1.vcf");
  22.  
  23.    Liste_1 := new Listenelement;
  24.    Aktuell := Liste_1;
  25.  
  26.    while not Text_IO.End_Of_File (Datei_1) loop
  27.       Text_IO.Get (Datei_1, Aktuell.Inhalt);
  28.       Text_IO.Put (Aktuell.Inhalt);
  29.       Aktuell.Naechstes := new Listenelement;
  30.       Aktuell := Aktuell.Naechstes;
  31.    end loop;
  32.  
  33.    Text_IO.Close (Datei_1);
  34.  
  35.    Aktuell := Liste_1;
  36.  
  37.    --while Aktuell /= null loop
  38.       --Text_IO.Put (Aktuell.Inhalt);
  39.       --Text_IO.New_Line;
  40.       --Aktuell := Aktuell.Naechstes;
  41.    --end loop;
  42.  
  43. end Visuelle_Kryptographie;
Add Comment
Please, Sign In to add comment