Deutsch   English   Français   Italiano  
<73aedef89896db7fe5bc43b8d47a8560537c6a48@i2pn2.org>

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

Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: John Reagan <johnrreagan@earthlink.net>
Newsgroups: comp.os.vms
Subject: Re: VMS Pascal article
Date: Tue, 7 Jan 2025 15:16:22 -0500
Organization: i2pn2 (i2pn.org)
Message-ID: <73aedef89896db7fe5bc43b8d47a8560537c6a48@i2pn2.org>
References: <vl3pi8$2r2sr$1@dont-email.me>
 <32c650bc31b39adeff0a08171c91e514d83d7b7f@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 7 Jan 2025 20:16:22 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="2496420"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="85Cwws6+ypgQVu4foqgE6eSuYb0IIJZq6Fz6j0v4a/s";
User-Agent: Mozilla Thunderbird
Content-Language: en-US
X-Spam-Checker-Version: SpamAssassin 4.0.0
In-Reply-To: <32c650bc31b39adeff0a08171c91e514d83d7b7f@i2pn2.org>
Bytes: 3963
Lines: 68

On 1/6/2025 5:52 PM, John Reagan wrote:
> On 1/1/2025 11:12 AM, Arne Vajhøj wrote:
>> VMS Pascal for C/Java/C# programmers:
>>       https://www.vajhoej.dk/arne/articles/vmspascal.html
>>
>> It is a "pre-release" - I am not sure I got it right.
>>
>> So I would love some feedback.
>>
>> Arne
>>
> I'll look and give feedback.
> 
> John
For modern OpenVMS usage, you might want to discuss how to get 64-bit 
pointers vs 32-bit pointers.  C has the pointer_size pragma to modify 
the "current pointer size".  Pascal uses the [QUAD] attribute in front 
of the pointer uparrow. There isn't a DCL qualifier (or module-level 
attribute) to control the default of 32-bits.  I'd add one now but who 
would use it?

var
    ptr64 : [quad] ^integer;
    ptr32 :        ^integer;

The compiler will call the appropriate Pascal RTL routine for NEW or 
NEW64 based on the pointer's type.

As noted, QUADRUPLE is always 128-bits.  With all the hassle with 
missing support on x86, I should have added the equivalent of /L_DOUBLE 
for Pascal (and others as well).

Yes, VARYING OF CHAR is a VAX Pascal V2.0 extension based highly on 
PL/1's VARYING OF CHAR.  I've seen comments hinting about an early form 
of VARYING OF BITS as well but that was never added.

Extended Pascal's STRING type is modeled much on VAX Pascal's VARYING OF 
CHAR.  You can check the Extended Pascal's title page to see who was the 
X3J9 Secretary at the time. 😉

The VARYING OF CHAR .BODY and .LENGTH are quite powerful especially when 
you use them with IADDRESS.  Along with the VAX Pascal V1 directives of 
%IMMED, %REF, and %STDESCR (notice the parallel with Fortran?), you can 
do many descriptor operations with ease.

STRING allows for a run-time length since it is an Extended Pascal 
"schema" type.  VARYING OF CHAR does not.  We could have added that 
feature to VARYING OF CHAR but we didn't.

We only added the Extended Pascal features that we thought were new and 
interesting.  For example, we didn't bother with Extended Pascal's 
"complex" type.  If you want a complex type, you code in Fortran as God 
intended.  We didn't add the EP direct access file syntax since the VAX 
Pascal syntax provides the same feature set (guess where the feature set 
came from).  We also didn't add the EP module syntax which added 
namespaces.  (The PEN format actually has support for multiple name 
spaces but the compiler doesn't take advantage of it).

The Pascal SDL backend was ever thought about 64-bit integers and such 
since we wanted to keep as much recompile-and-go as possible.

Yes, the Pascal examples installed by the kit are a good resource.  I 
haven't updated them in quite a while.  Perhaps it is time.  Maybe I'll 
do that when I finish the conversion to PCSI.  Any suggestions?

I have a copy of Theo De Klerk's book on my bookshelf.  I did the 
technical review of that book (wow, that is a long time ago!)