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,5997b4b7b514f689 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Reading a line of arbitrary length Date: 1997/02/13 Message-ID: <1997Feb13.103803.1@eisner>#1/1 X-Deja-AN: 218526942 X-Nntp-Posting-Host: eisner.decus.org References: <5ds40o$rpo@fg70.rz.uni-karlsruhe.de> <01bc18d6$41e00680$188c71a5@dhoossr.iquest.com> <330319F1.41C67EA6@innocon.com> <5dv7ea$epi$1@news.iag.net> X-Nntp-Posting-User: KILGALLEN X-Trace: 855848291/5934 Organization: LJK Software Newsgroups: comp.lang.ada Date: 1997-02-13T00:00:00+00:00 List-Id: In article <5dv7ea$epi$1@news.iag.net>, dennison@zippy.cc.ukans.edu (Ted Dennison) writes: > In article <330319F1.41C67EA6@innocon.com>, > Jeff Carter wrote: >>David C. Hoos, Sr. wrote: >>> >>> What you do is read into a temporary String of length larger than any you >>> will encounter. Then you use the value of the actual parameter supplied >>> for the formal parameter "Last" to take the appropriate slice from the >>> temporary string. >> >>This assumes, of course, that you can define a "length larger than any >>you will encounter." In some cases, you cannot. This is still not a >>problem; see "Variable-Length String Input in Ada," _Ada Letters_, 1989 >>May/Jun, which presents a function > > Hmmm. I thought all unix (and VMS) shells had a command-line limit of 256 > characters (or less). Is that not the case? I cannot find the post which started this thread, but at least the excerpts which have survived do not seem to indicate this is a command line. For the VMS case, there are three command line limits, one of which may be 256 for some version of VMS: Maximum characters in a DCL symbol (not our problem) Maximum characters in a command to be parsed by VMS Maximum characters in a "foreign" command But then there is: Maximum characters from reading SYS$INPUT which is limited by how the system manager has set the typeahead buffer and also by MAXBUF. Those could probably extend to 65535 (or to 32767 with less chance of finding a new bug). So that is about 32K bytes (+/- 80 bytes) difference between a "length larger than any you will encounter." and "what you will typically need". Larry Kilgallen