From: cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!howland
Subject: Re: How to assign STRINGs?
Date: 26 Aug 93 18:17:47 GMT [thread overview]
Message-ID: <CCDpHn.2rr@irvine.com> (raw)
In article <CCDLMo.A8D@cs.uiuc.edu> 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
next reply other threads:[~1993-08-26 18:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-08-26 18:17 cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!howland [this message]
-- strict thread matches above, loose matches on Subject: below --
1993-09-07 21:56 How to assign STRINGs? Robert I. Eachus
1993-09-03 18:18 dog.ee.lbl.gov!overload.lbl.gov!agate!doc.ic.ac.uk!uknet!mcsun!ub4b!cfmu!
1993-08-27 20:23 Robert I. Eachus
1993-08-27 19:00 Tucker Taft
1993-08-27 15:35 cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!noc.near.ne
1993-08-26 16:54 cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!howland.
1993-08-26 14:09 Joe Hildebrand
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox