From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,217ce8585deaa093 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Could you help me debug this please? Date: 1999/05/25 Message-ID: <7if9la$kjd$1@nnrp1.deja.com>#1/1 X-Deja-AN: 482061989 References: <374a318b.1942660@news.ozemail.com.au> X-Http-Proxy: 1.0 x26.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Tue May 25 22:53:32 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-05-25T00:00:00+00:00 List-Id: In article <374a318b.1942660@news.ozemail.com.au>, rum_and_cola@hotmail.com (Aaron) wrote: > I keep getting the error mesage "Statemnt Expected" in line 73 > whenever I try compiling this program. If anyone could help me, I'd be > greatful. > > with Text_Io; > procedure Assessment2 is > > --types and packages > type Choice is > (Migrate, Previous, Stop); > package Choice_Io is new > Text_Io.Enumeration_Io > (Enum => Choice); > > --variables > Code: Choice; > in_data : text_io.file_type; > filename, degree, migrantname, YOB, money: string (1..20); > last: natural; > > --functions > procedure Get_The_Action; > --gets the input from the keyboard for the main menu > procedure write_data > (in_data : in out text_io.file_type); > -- procedure to get the names of people and store them. > > procedure Get_The_Action is > begin > Text_Io.Put("Migration Program:"); > Text_Io.New_Line; > Text_Io.Put("Enter 'Migrate' to store migrants details on file."); > Text_Io.New_Line; > Text_Io.Put("Enter 'Previous' to read and display information about > migrants."); > Text_Io.New_Line; > Text_Io.Put("Enter 'Finish' to quit."); > Text_Io.New_Line; > Choice_Io.Get(Code); > end Get_The_Action; > > procedure write_data > (in_data : in out text_io.file_type) is > begin > text_io.put("Migrants Name:"); > text_io.get_line(migrantname, last); > text_io.put(file=>In_data, > item=> migrantname); > text_io.new_line(file =>in_data); > text_io.put("Degree in computing (Y/N):"); > text_io.get_line(degree, last); > text_io.put(file=>In_data, > item=> degree); > text_io.new_line(file =>in_data); > text_io.put("Year of Birth:"); > text_io.get_line(YOB, last); > text_io.put(file=>In_data, > item=> YOB); > text_io.new_line(file =>in_data); > text_io.put("Amount of Money:"); > text_io.get_line(money, last); > text_io.put(file=>In_data, > item=> money); > text_io.new_line(file =>in_data); > Text_Io.Put("Enter the file name and path: "); > Text_Io.Get_line(filename, last); > Text_Io.create (File=>In_Data, > Mode=>Text_Io.out_File, Name=>filename); > write_Data(In_Data); > Text_Io.Close(In_Data); > end write_data; > > begin > get_the_action; > if (Code=previous) then > text_Io.Put("Not written yet "); > elsif (Code=migrate) then > (write_data(in_data : out text_io.file_type)); > else > text_io.put("ok"); > end if; > text_io.put("Goodbye"); > end assessment2; > --== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.---