comp.lang.ada
 help / color / mirror / Atom feed
From: austin.obyrne@hotmail.com
Subject: Re: Can I Do this – Help Badly Needed.
Date: Fri, 15 Jun 2012 08:36:11 -0700 (PDT)
Date: 2012-06-15T08:36:11-07:00	[thread overview]
Message-ID: <94d92aa1-8e29-4acd-bf8f-34b6304d1a47@googlegroups.com> (raw)
In-Reply-To: <70866b0e-472c-4998-b081-51a15fc675dc@googlegroups.com>

On Friday, June 15, 2012 2:06:12 PM UTC+1, austin...@hotmail.com wrote:
> I want to write to two external files in turn from within the same program:
> 
> This is the first prompt,
> 
>   Ada.Text_IO.Put
>   (Item => " Please enter the name of the unsorted file >");
>   Ada.Text_IO.New_Line(2);
>   Ada.Text_IO.Put
>   (Item => " Call it UnSortedNumberFile_n.dat - for whatever 'n' may be >");
>   Ada.Text_IO.New_Line(2);
>   Ada.Text_IO.Put(Item => " ");
>   Ada.Text_IO.Get_Line(Item => OutFileName,Last => OutNameLength);
>   Ada.Text_IO.New_Line(2);
>   Ada.Text_IO.Create(File => OutData,
>   Mode => Ada.Text_IO.Out_File,Name => OutFileName(1 .. OutNameLength));
> 
>  Name given: UnsortedNumbers_n.dat 
> 
> Later on after some more computation in the same program I want to write out to another external file of a different name and I use the same prompt again that is only only slightly changed in the names.
> 
> Second prompt.
> 
>   Ada.Text_IO.Put
>   (Item => " Please enter the name of the unsorted file >");
>   Ada.Text_IO.New_Line(2);
>   Ada.Text_IO.Put
>   (Item => " Call it SortedNumberFile_n.dat - for whatever 'n' may be >");
>   Ada.Text_IO.New_Line(2);
>   Ada.Text_IO.Put(Item => " ");
>   Ada.Text_IO.Get_Line(Item => OutFileName,Last => OutNameLength);
>   Ada.Text_IO.New_Line(2);
>   Ada.Text_IO.Create(File => OutData,
>   Mode => Ada.Text_IO.Out_File,Name => OutFileName(1 .. OutNameLength)); 
> 
> Name given: SortedNumbers_n.dat 
> 
> Is this allowable?.
> 
> Your help would be greatly appreciated
> 
> -adacrypt




  parent reply	other threads:[~2012-06-15 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15 13:06 Can I Do this – Help Badly Needed austin.obyrne
2012-06-15 15:21 ` Adam Beneschan
2012-06-15 15:54   ` austin.obyrne
2012-06-15 15:36 ` austin.obyrne [this message]
2012-06-16 13:36 ` 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