Well, Bob, I went back to check and there really were ghosts for Halloween!

   k=.'blåbærgrød'
   t=:(a:-.~<;._2)@,&' '
   tt=:(<;._2)@,&' '
   t k
┌─────────────┐
│blåbærgrød│
└─────────────┘
   tt k
┌─────────────┐
│blåbærgrød│
└─────────────┘
   tt k, '    ',k
┌─────────────┬┬┬┬─────────────┐
│blåbærgrød││││blåbærgrød│
└─────────────┴┴┴┴─────────────┘

There are all the spaces that you promised.
   
This is how I came to believe they didn't exist:

   (t k)-:tt k
1

Spooky don't you think....

Linda

-----Original Message-----
From: programming-boun...@forums.jsoftware.com 
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of bob therriault
Sent: Wednesday, October 31, 2012 1:10 AM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] danish blueberry porridge

Hi Linda,

I guess it depends whether you want multiple spaces between words to show up as 
empty boxes. The idea of the a:-.~ part of the fork is to remove the empty 
boxes. To see the effect try

   t k, '    ',k
+-------------+-------------+
|blåbærgrød|blåbærgrød|
+-------------+-------------+

   tt k, '    ',k
+-------------++++-------------+
|blåbærgrød||||blåbærgrød|
+-------------++++-------------+

Cheers, bob

On 2012-10-30, at 9:36 PM, Linda Alvord wrote:

> I am just getting started with this thread and I don't know Danish or 
> Unicode, but...
> 
>   t=:(a:-.~<;._2)@,&' '
>   t k
> ┌─────────────┐
> │blåbærgrød│
> └─────────────┘
>   tt=:(<;._2)@,&' '
>   tt k
> ┌─────────────┐
> │blåbærgrød│
> └─────────────┘
>   (t k)-:tt k
> 1
> 
> Does tt miss something important?
> 
> If not then:
> 
>    ttt=:[: <;._2 ' ' ,~ ]
>   (ttt k)-:t k
> 1   
> 
> Linda
> 
> -----Original Message-----
> From: programming-boun...@forums.jsoftware.com 
> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of bob therriault
> Sent: Friday, October 19, 2012 8:58 PM
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] danish blueberry porridge
> 
> What about using cut? (;.)
> 
> k=.'blåbærgrød'
>   k
> blåbærgrød
>   t=: (a:-.~<;._2)@,&' '  NB. removing a: to clean up multiple spaces
>   t k
> +-------------+
> |blåbærgrød|
> +-------------+
>   k=.'blåbærgrød blåbærgrød'
>   t k
> +-------------+-------------+
> |blåbærgrød|blåbærgrød|
> +-------------+-------------+
>   k=.'blåbærgrød         blåbærgrød'
>   t k
> +-------------+-------------+
> |blåbærgrød|blåbærgrød|
> +-------------+-------------+
> 
> On 2012-10-19, at 4:05 PM, Bo Jacoby wrote:
> 
>>   k=.'blåbærgrød'
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

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

Reply via email to