From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7b7c6b457397ec4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-22 14:15:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!iad-peer.news.verio.net!news.verio.net!solaris.cc.vt.edu!news.vt.edu!msunews!not-for-mail From: "Chad R. Meiners" Newsgroups: comp.lang.ada Subject: Re: how to validate if a file exist ? Date: Sun, 22 Sep 2002 17:12:33 -0400 Organization: Michigan State University Message-ID: References: Reply-To: "Chad R. Meiners" NNTP-Posting-Host: arctic.cse.msu.edu X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:29265 Date: 2002-09-22T17:12:33-04:00 List-Id: begin Open (...); -- file exists and is open Close (...); exception when name_error => -- file does not exist. end; You have two paths here so if you don't end up handling the exception the file exists, right? Please note that you shouldn't expect an exception for the existence of a file. If you are taking a class, should discuss this with your instructor; you seem to misunderstand how the exception mechanism is meant to be used. "Dominic D'Apice" wrote in message news:mailman.1032719103.21393.comp.lang.ada@ada.eu.org... Hi all, I know that i can validate if a file don't exist with this : --------------------------------------------------- exception when ada.text_io.name_error => ada.text_io.put("file not found"); ada.text_io.skip_line; --------------------------------------------------- BUT, HOW CAN I VALIDATE IF A FILE EXIST ? (I did not found any exception about this way.) thank to reply Dominic