* read filename and then open text file
@ 2002-11-16 20:07 Bjoern Schiessle
2002-11-16 21:44 ` Stephen Leake
0 siblings, 1 reply; 2+ messages in thread
From: Bjoern Schiessle @ 2002-11-16 20:07 UTC (permalink / raw)
Hello,
I am an Ada beginner and try do read a filename and then open the file,
but it doesn't work.
I have tried this:
with Ada.Text_IO;
with Ada.Strings.Unbounded;
with Ada.Strings.Unbounded.Text_IO;
use Ada.Text_IO;
use Ada.Strings.Unbounded;
use Ada.Strings.Unbounded.Text_IO;
procedure test is
file : File_Type;
filename : Unbounded_String;
begin
Put_line("Geben Sie das zu erratende Wort ein (nur grossbuchstaben):");
Put(">");
Wort := Get_Line;
Open(Datei, In_File, Dateiname);
...
but it doesn't work. I get the message:
expected type "Standard.String"
found private type "Ada.Strings.Unbounded.Unbounded_String"
I have no idea how i must read the filename. Can someone help me?
Thanks a lot
Bjoern
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: read filename and then open text file
2002-11-16 20:07 read filename and then open text file Bjoern Schiessle
@ 2002-11-16 21:44 ` Stephen Leake
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Leake @ 2002-11-16 21:44 UTC (permalink / raw)
Bjoern Schiessle <devnull@schiessle.org> writes:
><snip>
> but it doesn't work. I get the message:
>
> expected type "Standard.String"
> found private type "Ada.Strings.Unbounded.Unbounded_String"
There is a "To_String" function in Ada.Strings.Unbounded; it does what
you need.
Please post compilable code; that will get better help.
--
-- Stephe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-16 21:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-16 20:07 read filename and then open text file Bjoern Schiessle
2002-11-16 21:44 ` Stephen Leake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox