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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,691bbbf0ab0cc67e,start X-Google-Attributes: gid103376,public From: john@assen.demon.co.uk (John McCabe) Subject: [Q] Returning Strings From A Function Date: 1997/04/04 Message-ID: <33454165.1658515@news.demon.co.uk>#1/1 X-Deja-AN: 230715257 X-NNTP-Posting-Host: assen.demon.co.uk Newsgroups: comp.lang.ada Date: 1997-04-04T00:00:00+00:00 List-Id: Hello all. I hope someone can help me as how to do this has completely slipped my mind, and I'm having trouble finding what I'm looking for in the Ada LRM (83) and Barnes. I have a function, let's call it Text_IO.Name which returns a string. If I have an object let's say File_Name, what would be the correct (or best) way to declare that object in order for the statement: File_Name := Text_IO.Name (File); (or something similar with slices?) to work without me getting a constraint error by trying to assign a string of n characters to an object /=n characters long. Should I be using subtypes here or what. I'm sure this will appear to be a really stupid question, but at the moment I'm being frustrated and I can't think straight! Thanks in advance. Best Regards John McCabe