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

# Re: A peeve.

- Date: Sat, 21 Dec 1996 23:30:41 PST
- From:
- cc: moo-cows@parc.xerox.com
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- In-Reply-To: <3.0.1.32.19961221220952.00691d2c@pop.kaiwan.com>

    On Sat, 21 Dec 1996, Brack wrote:
    > there is a way to do it, it's just kind of silly/non-intuitive/whatever.
    > try blah[2..2]=""

    It's not actually silly. If you think of a string in light of how the list
    operators work, it makes sense.

    {0,1,2}[2..2]={}
    makes
    {0,2}

    {0,1,2}[2]={}
    makes
    {0,{},2}

    In the second example you are replacing one element with another. In a string
    each character is an element, so it doesn't make sense.

    TTFN
    Andy

    --
    Peace Through Superior Firepower                                  Andrew Wendt
    Which word doesn't belong:                               powerpig@arbornet.org
    Christianity, Hypocrisy, Lies, Trickery, Sheep                 awendt@magi.com

References:

- Re: A peeve.

- From: Brack <slayer@kaiwan.com>

- Prev: Re: A peeve.
- Next: Prolog and Lisp interfaces
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index