help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Storing cursor positions using tput into an array.


From: Dan Douglas
Subject: Re: [Help-bash] Storing cursor positions using tput into an array.
Date: Fri, 15 Sep 2017 03:16:29 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 09/14/2017 03:44 PM, Greg Wooledge wrote> Bash *cannot* store an array of 
n-tuples (n-element lists), so a single
> array of (X,Y) coordinate pairs simply doesn't make sense in bash.
> But once you know that you just want to store a bunch of (X,Y) coords,
> you can use something bash *can* do, like two separate arrays that
> share a common set of indices.

I'd probably use one array of n-tuples in this situation. Its
particularly useful in loops. You just refer to an offset + n args on
each iteration. Two arrays works fine too, of course.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]