brxinv =: ([: (x: inv :: ] (L:0)^:IF64) (3!:2)) 

brx =: 1 (3!:1) x: :: ] (L:0) :. brxinv

intent is to get portable 32bit representation of non-extended data

on 64 bit machine, brx looks right (ie :. rightside looks the same)

 brx 
(1) 3!:1 x: ::]L:0 :.([: (x:^:_1 ::]L:0^:1) 3!:2) 
 brxinv 
[: (x:^:_1 ::]L:0^:1) 3!:2 


  brxinv brx 'asdf'; (i.2 3);89192739123719823 
┌────┬─────┬─────────────────┐ 
│asdf│0 1 2│89192739123719823│ 
│    │3 4 5│                 │ 
└────┴─────┴─────────────────┘but

  brx inv brx 'asdf'; (i.2 3);89192739123719823 
|domain error 
|       brx inv brx'asdf';(i.2 3);89192739123719823
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to