[Info-vax] String handling

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Sat Feb 15 16:16:25 EST 2014


On 2014-02-15, Stephen Hoffman <seaohveh at hoffmanlabs.invalid> wrote:
> On 2014-02-15 16:51:21 +0000, Simon Clubley said:
>
>> I was asking about VMS Basic (ie: DEC/CPQ/HP Basic) not about how VMS 
>> implements string handling.
>> 
>> IOW, when David talked about fixed strings in VMS Basic, did he really 
>> mean fixed strings in the sense of Ada's String data type in which the 
>> length is immutable, or did he really mean something closer to Ada's 
>> Bounded_String data type ?
>
> The DEC BASIC fixed-length strings use scaler-class string descriptors, 
> and the string contents are exact-fit / force-fit.  The text strings 
> are truncated or are space-padded to fit, as required.
>

Thanks, Hoff; I've never used DEC/CPQ/HP BASIC.

That fits with my definition of a fixed length string and the closest in
Ada would be a variable of the String data type, which, once created, has
a immutable length.

However, unless you call the appropriate function, you need to handle
the padding/truncation yourself. This is in keeping with Ada's safety
orientated mindset.

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



More information about the Info-vax mailing list