home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / MULTIMAP.ZIP / TESTMAP.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1985-10-03  |  2.5 KB  |  87 lines

  1. Program Testmap;
  2.  
  3. (*$i Multimap.box*)
  4.  
  5. Type Name = (Dummy,First,Middle,Last);
  6.      Address = (hold,CityIn,StateIn,ZipIn);
  7.  
  8.      Personal_Data  =  record
  9.                         First_Name  : String[10];
  10.                         Mid_Init    : String[1];
  11.                         Last_Name   : String[15];
  12.                         City        : String[20];
  13.                         State       : String[2];
  14.                         Zip         : String[5];
  15.                        end;
  16. Var I,Page:Integer;
  17.     Person:Personal_Data;
  18. Begin
  19. Textmode(C80);
  20. Init_Paging;
  21. Cursorsize(8,0);
  22. Map('Building maps...',0,12,32,Magenta,black);
  23.  
  24. Map('Page 2',1,1,70,99,99);
  25. Map('Page 3',2,1,70,99,99);
  26. Map('Page 4',3,1,70,99,99);
  27. Map('Use the cursor movement keys to move around',3,1,1,99,99);
  28. For i:=2 to 22 do
  29. Begin
  30.    Mapu('_____',3,i,1,random(10)+1,black);
  31.    Mapu('_____',3,i,10,random(10)+1,99);
  32.    Mapu('_____',3,i,20,random(10)+1,99);
  33.    Mapu('_____',3,i,30,random(10)+1,99);
  34.    Mapu('_____',3,i,40,random(10)+1,99);
  35.    Mapu('_____',3,i,50,random(10)+1,99);
  36.    Mapu('_____',3,i,60,random(10)+1,99);
  37.    Mapu('_____',3,i,70,random(10)+1,99);
  38. End;
  39.  
  40. Clearpage(0,black);
  41. Map('Page 1',0,1,70,magenta,black);
  42. for I := 0 to 3 do
  43. begin
  44.  Map('  F1 - Page1      F2 - Page 2      F3 - Page 3     F4 - Page 4  ',i,24,10,red,lightgray);
  45.  Map(' Esc - Quit ',i,25,34,yellow+blink,brown);
  46. end;
  47. Map('Please enter your name-',0,5,1,green,black);
  48. Map('First:',0,7,20,99,99);
  49. Map('Middle:',0,9,20,99,99);
  50. Map('Last:',0,11,20,99,99);
  51. Mapu('__________',0,7,27,red,99);
  52. Mapu('_',0,9,28,99,99);
  53. Mapu('_______________',0,11,26,99,99);
  54. Map('What is your address?',1,5,1,white,blue);
  55. Map('City:',1,7,20,99,99);
  56. Map('State:',1,9,20,99,99);
  57. Map('Zip:',1,11,20,99,99);
  58. Mapu('____________________',1,7,26,brown,black);
  59. Mapu('__',1,9,27,99,99);
  60. Mapu('_____',1,11,25,99,99);
  61. Map('This page left blank',2,12,30,Magenta+blink,black);
  62. Mapu(' ',2,1,1,black,black);
  63. Page:=0;
  64. Repeat
  65.  If Page = 3 then Cursorsize(0,7) else Cursorsize(6,7);
  66.  Readmap(Page,1);
  67.  If Functionkey_Pressed then
  68.  Case Functionkey of
  69.   1..4: Page := Functionkey - 1;
  70.  end;
  71. Until Escape;
  72. Clearpage(0,black);
  73. Displaypage(0);
  74. With Person do
  75. begin
  76.   First_Name := Get_data(0,ord(First));
  77.   Mid_Init   := Get_Data(0,ord(Middle));
  78.   Last_Name  := Get_Data(0,ord(last));
  79.   City       := Get_data(1,ord(cityIn));
  80.   State      := Get_data(1,ord(StateIn));
  81.   Map('Hello, '+First_Name+' '+Mid_Init+'. '+Last_Name,0,5,25,red,99);
  82.   map('from '+City+', '+State+'.',0,6,25,99,99);
  83. end;
  84. end.
  85.  
  86.  
  87.