comp.lang.ada
 help / color / mirror / Atom feed
From: Bjoern Schiessle <devnull@schiessle.org>
Subject: read filename and then open text file
Date: Sat, 16 Nov 2002 21:07:01 +0100
Date: 2002-11-16T21:07:01+01:00	[thread overview]
Message-ID: <pan.2002.11.16.21.07.01.344604.1124@schiessle.org> (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



             reply	other threads:[~2002-11-16 20:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-16 20:07 Bjoern Schiessle [this message]
2002-11-16 21:44 ` read filename and then open text file Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox