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=-1.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6482d0ae6dcb1b4c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-22 18:53:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: "Dominic D'Apice" Newsgroups: comp.lang.ada Subject: if_file_exist : it's working thankyou all! Date: Sun, 22 Sep 2002 21:53:04 -0400 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1032745981 18017 137.194.161.2 (23 Sep 2002 01:53:01 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 23 Sep 2002 01:53:01 +0000 (UTC) Return-Path: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.13 Precedence: bulk List-Unsubscribe: , List-Id: comp.lang.ada mail<->news gateway List-Post: List-Help: List-Subscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:29270 Date: 2002-09-22T21:53:04-04:00 Well, it's working good ! -- verifie si un fichier existe procedure si_fic_existe (fichier : out ada.text_io.file_type ; mod_fic_ecr : in ada.text_io.file_mode ; nom_fic : in string ) is begin ada.text_io.open (fichier,mod_fic_lec,nom_fic); ada.text_io.close(fichier); raise sortir_program_principal; exception when ada.text_io.name_error => null; end si_fic_existe; -----Original Message----- From: comp.lang.ada-admin@ada.eu.org [mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of SteveD Sent: 22 septembre, 2002 18:29 To: comp.lang.ada@ada.eu.org Subject: Re: if file exist >"Dominic D'Apice" wrote in message >news:mailman.1032687678.1150.comp.lang.ada@ada.eu.org... >Hello all, > >How can i know if a text file exist ? > >I mean : > >Procedure IF_FILE_EXIST is >Begin >. >end IF_FILE_EXIST; > How about something along the lines of: Pseudo code: Procedure IF_FILE_EXIST is begin open the existing file close the file return true; exception when the exception occurs that is associated with a file not present => return false; end IF_FILE_EXIST; I hope this helps (I hope it works too!) SteveD >thank in advance >Dominic _______________________________________________ comp.lang.ada mailing list comp.lang.ada@ada.eu.org http://ada.eu.org/mailman/listinfo/comp.lang.ada