From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 26 Aug 93 18:17:47 GMT From: cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!howland .reston.ans.net!agate!netsys!pagesat!news.cerf.net!shrike.irvine.com!adam@ucbva x.Berkeley.EDU (Adam Beneschan) Subject: Re: How to assign STRINGs? Message-ID: List-Id: In article rowe@cs.uiuc.edu (Kenneth E. Rowe) writes: > matwood%peruvian.cs.utah.edu@cs.utah.edu (Mark Atwood) writes: > > > > function GET_PARM return STRING; > > -- from the vendor supplied DOS package > > > > with TEXT_IO; > > procedure ECHO is > > subtype STR is STRING(1 .. 255); > > CMDLINE : STR; > > begin > > CMDLINE := DOS.GET_PARMS; -- get a CONTRAINT_ERROR here > > TEXT_IO.PUT_LINE (CMDLINE); > > end ECHO; > > > > > > have you tried > CMDLINE (1..255) := Dos.Get_Parms; > ??? If you haven't tried it yet, don't bother. Given the declaration of CMDLINE, the following two statements are equivalent: CMDLINE := DOS.GET_PARMS; CMDLINE (1..255) := DOS.GET_PARMS; so if one fails on a CONSTRAINT_ERROR, the other will fail also. Other postings have already suggested alternatives that will work. -- Adam