There seems to be an issue with []MOM and []FX. Observe the following sequence. A function "Ave" is loaded in to the workspace, "a" is defined, and a.Ave is defined. The workspace is then saved. Then the workspace is cleared, and the saved workspace is Copied back in. "a" gets copied, and you can perform []CR on "a". But if you try to execute the function, you get a VALUE ERROR on "x". Huh? BUT, if you create "a" and then "a.Ave", and execute a.Ave, then save the workspace. Clear the workspace, and then copy "a" back into the workspace, everything is OK.
Here is the sequence that produces the failure:
)clear
CLEAR WS
]uload Ave
1 object loaded
Œvr 'Ave'
’ r„Ave x
[1] r„(+/x)÷½,x
’
Ave 2 3 4 5
3.5
a„Œmom '' ''
a.Œfx Œcr 'Ave'
Ave
)wsid Test2
WAS CLEAR WS
)save
C:\APLWIN60\TEST2 SAVED Thursday, July 13, 2006 06:27:40 PM
)clear
CLEAR WS
)copy Test2; a
SAVED Thursday, July 13, 2006 06:27:40 PM
)vars
a
a
<<<Object Reference>>>
a.Œnl 2 3
Ave
a.Œcr 'Ave'
r„Ave x
r„(+/x)÷½,x
a.Ave 2 3 4 5
VALUE ERROR
Ave[1] r„(+/x)÷½,x
^
Here is the sequence that works OK, but only because a.Ave was executed before the workspace was saved.
)clear
CLEAR WS
]uload Ave
1 object loaded
Œvr 'Ave'
’ r„Ave x
[1] r„(+/x)÷½,x
’
Ave 2 3 4 5
3.5
a„Œmom '' ''
a.Œfx Œcr 'Ave'
Ave
a.Ave 2 3 4 5
3.5
)wsid Test3
WAS CLEAR WS
)save
C:\APLWIN60\TEST3 SAVED Thursday, July 13, 2006 06:29:34 PM
)clear
CLEAR WS
)copy Test3; a
SAVED Thursday, July 13, 2006 06:29:34 PM
a.Œnl 2 3
Ave
a.Ave 2 3 4 5 6 7 8
5
So you see what is difference in the above?
Interesting, no?
BH