From: Robert Dewar <robert_dewar@my-dejanews.com>
Subject: Re: Could you help me debug this please?
Date: 1999/05/25
Date: 1999-05-25T00:00:00+00:00 [thread overview]
Message-ID: <7if9la$kjd$1@nnrp1.deja.com> (raw)
In-Reply-To: 374a318b.1942660@news.ozemail.com.au
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.---
next prev parent reply other threads:[~1999-05-25 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-25 0:00 Could you help me debug this please? Aaron
1999-05-25 0:00 ` Robert Dewar [this message]
1999-05-25 0:00 ` Fernand0
1999-05-27 0:00 ` Shawn M. Root
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox