[Info-vax] String handling, was: Re: C... the only winning move is not to play...

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Sat Feb 15 08:44:21 EST 2014


On 2014-02-15, VAXman-  @SendSpamHere.ORG <VAXman- at SendSpamHere.ORG> wrote:
> In article <ldnnn6$ji6$1 at dont-email.me>, Simon Clubley <clubley at remove_me.eisner.decus.org-Earth.UFP> writes:
>>
>>For comparison, Ada has a half-way datatype, between fixed length and
>>fully dynamic strings, called Bounded_String in which space up to a
>>maximum length is pre-allocated but it's otherwise treated as a
>>dynamic string.
>
> That's a fixed length string in my view.  Think VMS string descriptor here.
> The storage is allocated to the amount bounded and that memory is made the
> pointer in the descriptor.  The only thing then that changes is the length.
>

Is VMS Basic's fixed length string really the same as a Bounded_String
(with a dynamic length component) ?

I'm more used to something described as a fixed length string really
being a immutable length (think Ada's String data type as a example here).

For example, I don't mentally think of "unsigned char buffer[80];" as
being a fixed length string. I think of it as more like a Bounded_String
but with a length indicated by a special character (0x00) instead of
a explicit length.

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