My problem is that when I get emacs to construct what look to me like
perfectly good atomic representations, the fix adverb (5!:0) barfs on them.
Does anyone know what secret thing makes an atomic rep different from what
I am building? I can make my editor work by giving up on fix and having
emacs send apl an input string with lots of doubled quotes and a ::
somewhere in the middle, but out of pure intellectual curiosity, I still
want to know how to build my own atomic representations.
Here's what I'm doing that doesn't work:
================= from J 2.9 session on Sun 4 ========================
mg
z=. 2
z $: y.
dg
x. * y.
$dg
1 7
mg build_ar dg
+------------------------------+
|+--+-------------------------+|
||::|+-----------+-----------+||
|| ||+-+-------+|+-+-------+|||
|| |||0|z=. 2 |||0|x. * y.||||
|| ||| |z $: y.||+-+-------+|||
|| ||+-+-------+| |||
|| |+-----------+-----------+||
|+--+-------------------------+|
+------------------------------+
(mg build_ar dg) FIX
domain error
real =. ar 'goo'
real
+------------------------------+
|+--+-------------------------+|
||::|+-----------+-----------+||
|| ||+-+-------+|+-+-------+|||
|| |||0|z=. 2 |||0|x. * y.||||
|| ||| |z $: y.||+-+-------+|||
|| ||+-+-------+| |||
|| |+-----------+-----------+||
|+--+-------------------------+|
+------------------------------+
goo2 =. real FIX
goo2 4
8
Here is the function I am using to make the fake
atomic reps:
build_ar
+---------+--+--------------------------------+
|x. $: i.0|::|< '::'; < (< (,0);x.) ,< (,0);y.|
+---------+--+--------------------------------+
Thanks for any help,
Michael
--
==============================================
Michael J. A. Berry
Internet: mj...@think.com
uucp: {harvard, uunet}!think!mjab
telephone: (617) 234-2056 FAX: (617) 234-4444
==============================================