From: "Andreas" <andreasv@telia.com>
Subject: Re: Command line
Date: Mon, 26 Apr 2004 16:08:56 GMT
Date: 2004-04-26T16:08:56+00:00 [thread overview]
Message-ID: <suajc.57284$mU6.235112@newsb.telia.net> (raw)
In-Reply-To: mailman.45.1082599236.314.comp.lang.ada@ada-france.org
Thanks for your answer. But, it actually didn't help. That's my fault; i
didn't specfy what my actual problem was. I'm so sorry for that.
Here i've got some code;
procedure MyGet is
sDate : string(1..10);
e : exception;
begin
ada.exceptions.raise_exception(e'identity,"Format_Error");
end;
procedure Test is
begin
loop
MyGet;
exception
when event: others =>
ada.text_io.put(ada.exceptions.exception_message(event));
end loop;
end;
"Test" is the first procedure called when i start my program. I start it
with the command line "Myprog < somedata.txt", so the data in "somedata.txt"
will be read in MyGet.
The problem here is, that i get (Using ObjectAda 7.2 at a Windows XP
machine) a compiler error. "Parse error: expected END_LOOP, got EXCEPTION,
Inserting END_LOOP".
How do i solve this?
Thanks in advance,
/Andreas
> If you are using Ada.Command_Line to pick up the name
> "data.txt", then you don't need the "<" to redirect it
> as standard input, or you could just pick up argument
> number 2. But it's better to drop the redirect, in
> that case.
>
> Otherwise, leave it the way you have it and just use
> Get, Get_Line, etc. (without the "file" argument) from
> Ada.Text_Io and it will be working with "data.txt" as
> standard input.
>
> Frank
next prev parent reply other threads:[~2004-04-26 16:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-20 23:39 Command line Andreas
2004-04-21 0:32 ` Stephen Leake
2004-04-21 8:53 ` Preben Randhol
2004-04-21 11:19 ` Jeff C,
2004-04-21 14:07 ` Preben Randhol
2004-04-22 2:00 ` Frank Beard
2004-04-26 16:08 ` Andreas [this message]
2004-04-26 17:19 ` Marius Amado Alves
2004-04-26 17:05 ` Andreas
2004-04-26 19:56 ` Marius Amado Alves
2004-04-26 19:52 ` Andreas
2004-04-29 13:40 ` Richard Riehle
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox