Deutsch   English   Français   Italiano  
<vl9m5f$k9a$1@reader2.panix.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cross@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.os.vms
Subject: Re: VMS Pascal article
Date: Fri, 3 Jan 2025 21:51:43 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <vl9m5f$k9a$1@reader2.panix.com>
References: <vl3pi8$2r2sr$1@dont-email.me> <vl9bjp$eq3$1@reader2.panix.com> <6778415e$0$708$14726298@news.sunsite.dk> <vl9khp$cdg$1@reader2.panix.com>
Injection-Date: Fri, 3 Jan 2025 21:51:43 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
	logging-data="20778"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)
Bytes: 3687
Lines: 65

In article <vl9khp$cdg$1@reader2.panix.com>,
Dan Cross <cross@spitfire.i.gajendra.net> wrote:
>In article <6778415e$0$708$14726298@news.sunsite.dk>,
>Arne Vajhøj  <arne@vajhoej.dk> wrote:
>>On 1/3/2025 1:51 PM, Dan Cross wrote:
>>> In article <vl9aln$o72$1@dont-email.me>, Arne Vajhøj  <arne@vajhoej.dk> wrote:
>>>> On 1/3/2025 1:17 PM, Dan Cross wrote:
>>>>> In article <67781447$0$711$14726298@news.sunsite.dk>,
>>>>>> And also fixed in the description of VARYING further up.
>>>>>
>>>>> You should seriously mention the STRING type, though.
>>>>
>>>> I think VARYING OF CHAR is what is used most in VMS Pascal.
>>> 
>>> Weird; I can't imagine why.
>>
>>I never use string (on VMS).
>>
>>$ search sys$common:[syshlp.examples.pascal]*.pas varying
>>$ search sys$common:[syshlp.examples.pascal]*.pas "string("
>>
>>indicate that whoever write VMS Pascal examples also prefer
>>varying of char over string.
>>
>>If I were to guess about why, then I believe it is historic
>>reasons. varying of char has been there since like forever.
>>string was added with ISO Pascal support later.
>
>I suspect that's close, but ISO Pascal doesn't have a 'VARYING'
>array type, either.
>
>I suspect you're referring to what ISO calls "Extended Pascal"
>(ISO 10206); ISO Pascal (ISO 7185) doesn't support a `String`
>type of either the VSI Pascal form or the Turbo
>Pascal/Delphi/FreePascal form, only manifest string literals and
>`packed array [1..n] of char`.  Of course, one can define a type
>alias, and ISO 7185 says this:
>
>|Any type designated packed and denoted by an array-type having
>|as its index-type a denotation of a subrange-type specifying a
>|smallest value of 1 and a largest value of greater than 1, and
>|having as its component-type a denotation of the char-type,
>|shall be designated a string-type.
>
>An annoyance with ISO Pascal is that an array's size is part of
>its type, and there is no separate slice type that could act
>as a window into an array independent of size and be passed
>around, so it is difficult to write procedures and functions
>that operate on e.g. strings, generically.  See also,
>https://www.lysator.liu.se/c/bwk-on-pascal.html
>
>However, these deficiencies are largely addressed in ISO 10206
>Extended Pascal, which provides a variable-length string type
>and permits conformant array parameters, which for VSI Pascal
>appear to monomorphize over the argument type.

Actually, I guess that conformant array parameterss were in ISO
7185, which had two "levels" of compliance; level 0 omitted them
and level 1 includes them.  That language is retained in ISO
10206.  Original, Wirth Pascal does not have them.

Extended Pascal's variable string type appears more or less
identical to the string type in VSI Pascal.

	- Dan C.