Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: how to truncate an array



On 03/05/2014 08:02 AM, Bart Schaefer wrote:
On Mar 4,  9:09pm, Ray Andrews wrote:
} Subject: Re: how to truncate an array
}
} What I mean is how the underlying C code knows to terminate
} the array. Come to think of it, there must be a null inserted, cuz
} that's how C does things

Zsh does happen to manage shell arrays as C array-of-pointers but as
I said before, in the shell syntax/semantics they function more like
linked lists.  Because the shell language is "higher level" than C,
the internals have to deal with all sorts of other stuff like memory
management.  Bash, for example, does use linked lists internally to
represent arrays.

My talk is just me psyching myself up to build zsh from source and then start poking around in the code. Don't take my ruminations seriously Bart, you have better things to do. I'll stop making such remarks
they make me sound bitchy.



Messages sorted by: Reverse Date, Date, Thread, Author