Play audio slide show -- Keyboard shortcut: 'x'  Lecture overview -- Keyboard shortcut: 'u'  Previous page: Struktureret programmering [Section] -- Keyboard shortcut: 'p'  Next page: Eksempel: Struktureret programmering (2) -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home  Play sound for this slide -- Keyboard shortcut: 'y'    Introduktion til objekt-orienteret programmering - slide 2 : 31

Eksempel: Struktureret programmering (1) 

 

Program Minibank;

Type Kontotype = (checkKonto, aktionærKonto, pensionsKonto,
                  gevinstKonto);
                   
  Bankkonto typedefinitioner;

  Procedure som gennemfører transaktioner;

  Function LaesKontotype: KontoType; begin ... end;

begin
  while not fyraften
  do begin
       kt := LaesKontoType;
       udfør en transaktion kontotype kt
     end
end.