bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] A better way to insert characters into a character vector?


From: Elias Mårtenson
Subject: Re: [Bug-apl] A better way to insert characters into a character vector?
Date: Fri, 28 Aug 2015 10:32:24 +0800

I'd do it like this:

    a[⍳2],"www",a[4]

But I don't think there's a "better" way.

Regards,
Elias

On 28 August 2015 at 10:17, <address@hidden> wrote:
Hi Bug APL,

I find that I frequently will do this:
      a←'alex'
      a[3]←⊂'www'
Which results in this:
      a
┌→─────────┐
│al ┌→──┐ x│
│   │www│  │
│   └───┘  │
└∊─────────┘

And then I will do this, because I want a character vector:

      a←⊃,/a
      a
alwwwx


So I guess more simply put. Is there a way to get from "alex" to "alwwwx" without the intermediary nested thing? Am I approaching this problem with the wrong functions?

-Alex





reply via email to

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