[Jprogramming] Open, padding with zeroes
Roger Hui
rogerhui.canada at gmail.com
Wed Dec 5 10:55:09 UTC 2012
> The dictionary entry for Open says: 'Results of different shapes are
padded as defined
> in Section II B. ', but Section II B is not about padding. Should it have
been another section?
The relevant passage in II B (
http://www.jsoftware.com/help/dictionary/dictb.htm ) is this:
Commonly these individual shapes agree, but if not, they are first brought
to a common rank by introducing leading unit axes to any of lower rank, and
are then brought to a common shape by *padding* with an appropriate
*fill*element: space for a character array,0 for
a numeric array, and a boxed empty list for a boxed array. For example:
The fill element used for this purpose is not subject to !. .
On Wed, Dec 5, 2012 at 2:26 AM, Bo Jacoby <bojacoby at yahoo.dk> wrote:
> Dear J'ers
>
> The Fit conjunction (!.) changes the default fill character like this
> 3 ({.!.'0') '11'
> 110
> but Fit gives domain error with Open:
> >'11';'111'
> 11
> 111
> (>!.'0')'11';'111'
> |domain error
> | ( >!.'0')'11';'111'
>
> I want this
> 110
> 111
>
> What is the work-around?
>
> The dictionary entry for Open says: 'Results of different shapes are
> padded as defined in Section II B. ', but Section II B is not about
> padding. Should it have been another section?
>
> - Bo
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
More information about the Programming
mailing list