Universidad de Cantabria, SPAIN
Author: Michael Gonzalez mgh@unican.es
Win_IO is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation.
with Ada.Text_IO; use Ada.Text_IO; with Input_Windows; use Input_Windows; procedure Test_Input_Window is Display : Input_Window_Type:=Input_Window("Test for Input Window"); Items : Integer; Degrees : Float; First_Name, Last_Name : String(1..20); Num_LN : Natural; begin -- Create Entries Create_Entry(Display,"Number of Items",4); Create_Entry(Display,"Degrees",180.0); Create_Entry(Display,"First Name","John"); Create_Entry(Display,"Last Name","Smith"); -- Wait for input Wait(Display,"Input data and press OK"); -- Read values Get(Display,"Number of Items",Items); Get(Display,"Degrees",Degrees); Get(Display,"First Name",First_Name); Get_Line(Display,"Last Name",Last_Name,Num_LN); -- Display values Put_Line("Number of Items=>"&Integer'Image(Items)); Put_Line("Degrees =>"&Float'Image(Degrees)); Put_Line("First Name =>"&First_Name&"<="); Put_Line("Last Name =>"&Last_Name(1..Num_LN)&"<="); end Test_Input_Window;