[Info-vax] Pascal question

Arne Vajhøj arne at vajhoej.dk
Mon Jan 21 20:10:25 EST 2019


On 1/21/2019 7:01 PM, Dave Froble wrote:
> On 1/21/2019 4:07 PM, Bill Gunshannon wrote:
>> On 1/21/19 3:39 PM, John Reagan wrote:
>>> On Monday, January 21, 2019 at 2:47:51 PM UTC-5, Bill Gunshannon wrote:
>>>> Maybe it's just me but that's trivial to write a function
>>>> for in Pascal.  It was one of the common student assignments
>>>> back when Pascal was the introductory language for the CS
>>>> Course of study.
>>>
>>> It is much harder than you think if you want to stick to standard
>>> Pascal ISO7185.  No array initializers and you cannot assume "array
>>> ['a'..'z'] of char" is even 26 bytes in length.  You can loop over the
>>> array and compare to see if it falls between 'a' and 'z' and update,
>>> but don't forget that EBCDIC has other characters in that range.
>>> Extended Pascal's 'index' and 'substr' make it much easier.
>>
>> I thought we were talking VMS here.  EBCDIC?
> 
> I've had occasion on both RSTS and VMS to work with EBCDIC data.  No 
> reason such support should not be present.

Newer languages that operate in Unicode and specify (explicit
or implicit) encoding at read or write can easily support
both ASCII, EBCDIC and hundreds of other encodings.

VMS Pascal is not among them though.

But I think that an upcase function operating
on DECMCS/ISO-8859-1 would do fine and that we can
live with those operating on EBCDIC having to do
their own, because it will be pretty rare.

And when VMS Pascal someday go Unicode, then we
can have it all.

Arne






More information about the Info-vax mailing list