comp.lang.ada
 help / color / mirror / Atom feed
From: Rob Norris <firstname.lastname@baesystems.com>
Subject: Re: Opening a file vs. creating if not yet exists
Date: Tue, 19 Aug 2008 13:36:05 +0100
Date: 2008-08-19T13:36:05+01:00	[thread overview]
Message-ID: <kefla4pk3mib2ba5lm1sg2e91s56vqkfpt@4ax.com> (raw)
In-Reply-To: af68d80f-0f42-4524-a963-80c91b427ad9@k7g2000hsd.googlegroups.com

On Mon, 18 Aug 2008 08:03:29 -0700 (PDT), Maciej Sobczak <see.my.homepage@gmail.com> wrote:

>
>What is the recommended way to deal with this?
>
>begin
>   Open (File, Append_File, "file.txt");
>exception
>   when Name_Error =>
>      Create (File, Append_File, "file.txt");
>end;
>
>Is the above idiomatic (ie. well understood and accepted as common
>practice)?

I don't know if it's common practice, but that's the main way we handle it for log files.



  reply	other threads:[~2008-08-19 12:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18 15:03 Opening a file vs. creating if not yet exists Maciej Sobczak
2008-08-19 12:36 ` Rob Norris [this message]
2008-08-19 12:58 ` amado.alves
2008-08-19 14:23 ` Jacob Sparre Andersen
2008-08-19 14:58   ` Maciej Sobczak
2008-08-21 15:41     ` Martin Krischik
2008-08-21 21:06       ` Maciej Sobczak
2008-08-21 15:42     ` Martin Krischik
replies disabled

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