home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1991 / 01 / layout / prog1.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1990-10-15  |  2.2 KB  |  94 lines

  1. program 1__Programm__Kapital;
  2.  
  3. {$V-}
  4. {$F+}
  5. {$N+}
  6. {$A-}
  7.  
  8. uses Syngate, Lay_Pas;
  9.  
  10. { ---------------------- Include Files ------------------- }
  11.  
  12. {$I D:\LO\PROG1.COD}
  13. {$I D:\LO\PROG1.RSC}
  14.  
  15.  
  16. procedure init_layout_prog_vars;
  17.  
  18. begin
  19.  
  20.    do_clear_card (Rechenblatt);
  21.  
  22.    menu_flag := 0;
  23.    Menu_Structure := @Menu_Struct_Table;
  24.    data_menu_titles := 0;
  25.    max_menu_width := 0;
  26.    max_menu_height := 0;
  27.  
  28. end;
  29.  
  30.  
  31. begin
  32.  
  33.    open_process;
  34.    init_layout_prog_vars;
  35.    initialize_screen (0);
  36.    setup_screen_variables;
  37.  
  38.    set_desktop ($AA,$55,0);
  39.    fill_desktop (0);
  40.  
  41.    zeiteinheitsz_hler := trunc (0);
  42.    { Zeiteinheitszähler=0 }
  43.  
  44.    get_byte_parameters (0, 13, 13, -15, 3, 13, 76);
  45.    set_relative_origin (Dbox_Srow, Dbox_Scol, Dbox_Width,
  46.                         Dbox_Height);
  47.    set_refresh_mode (tile);
  48.    open_window (Dbox_Srow, Dbox_Scol, Dbox_Erow, Dbox_Ecol);
  49.    name_window (Dbox_Srow, Dbox_Scol, Dbox_Erow, Dbox_Ecol,
  50.                 text_string1, 0);
  51.    {  RECHENBLATT  }
  52.  
  53.    get_byte_parameters (2, 0, 0, 12, 9, 12, 9);
  54.    set_card_orig (Rechenblatt, Dbox_Srow*$100 + Dbox_Scol);
  55.    get_card_input (1, 0, 0, Rechenblatt, dummy_handle,
  56.    gew_hlt);
  57.    { Rechenblatt ausfüllen }
  58.  
  59.    Rechenblatt.End_Kapital := Rechenblatt.Anfangskapital;
  60.    { Endkapital = Anfangskapital }
  61.  
  62.    while (zeiteinheitsz_hler <
  63.           Rechenblatt.Laufzeit__Monate_) do begin
  64.    { Wdh. für ganze Laufzeit }
  65.  
  66.      Rechenblatt.End_Kapital := Rechenblatt.End_Kapital+
  67.                                (Rechenblatt.End_Kapital
  68.                                *Rechenblatt.Zinssatz/100);
  69.      { Berechnung End-Kapital }
  70.  
  71.      zeiteinheitsz_hler := trunc (zeiteinheitsz_hler+1);
  72.      { Zeiteinheitszähler + 1 }
  73.  
  74.    end;
  75.  
  76.    get_byte_parameters (2, 0, 0, 20, 36, 20, 36);
  77.    display_variable (Rechenblatt.End_Kapital, 6, 0*$100 + 2,
  78.                      Dbox_Srow, Dbox_Scol);
  79.    { Rechenblatt.End_Kapital }
  80.  
  81.    wait (10000);
  82.    { Pause 10000 millisec. }
  83.  
  84.    reset_relative_origin;
  85.    get_byte_parameters (0, 13, 13, -15, 3, 13, 76);
  86.    set_refresh_mode (tile);
  87.    close_window(Dbox_Srow, Dbox_Scol, Dbox_Erow, Dbox_Ecol);
  88.    {  RECHENBLATT  }
  89.  
  90.    reset_program;
  91.    close_process;
  92.  
  93. end.
  94.