In an earlier post in the awk-like J sentences I used wrong part of speech where "adverse conjunction" was correct. Yes, awk gracefully handles bad data. And it's well worth learning if you use files. On DOS system I install mingw or cygwin. There might be a native version of gawk as well.

While not helping demonstrate under, fit works with laminate:

   'hi',:!.'*' 'there'
hi***
there

   ('hi',:!.'*' 'there') -: 'hi',:&.(-&(a.i.'*'))&.(a.&i.)'there'
1

Date: Sat, 15 Feb 2014 11:37:32 -0500
From: Raul Miller<[email protected]>
To: Programming forum<[email protected]>
Subject: Re: [Jprogramming] awk-like J sentences?
Message-ID:
        <cad2jou8omaebf__cyhng+p1el23gtbscyq6zweautzq4rsz...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
...
    'hi',:'there'
hi
there
    'hi',:&.(-&(a.i.'*'))&.(a.&i.)'there'
hi***
there

In that last example, I made the padding character by '*' rather than ' '.
I did this by combining the two strings as numbers rather than literals.
The padding value for numbers is zero. But if I had stopped  there I would
have gotten ascii nulls for my padding. So I also combined them under
subtracting by the numeric value for '*'.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to