Can anyone help with a rather disastrous bug I have found in POP-11?
I have recently worked right through all my POP-11 code and modularised it in POP-11 sections. When I came to run it yesterday, I found that well tried and tested code no longer functioned!
I have found the problem, and need an answer urgently.
I have used the matcher arrow '-->' frequently, eg for assigning the bounds of arrays to limiting arguments in for-loops.
Unfortunately this language feature does not operate from within sections.
I have adapted this example from the teach files to demonstrate:
section $-banana
=>
TAIL
;
define TAIL(L) -> RESULT;
L --> [= ??RESULT] ;
enddefine;
endsection;
TAIL([A B C D]) =>
gives the answer <undef RESULT>
If the section declaration is removed, the result is [B C D].
I believe the matcher is implemented as a macro, like switchon. If so; will I also have the same problem with all my switchon conditionals? I haven't had time to check this yet.
If it is a problem of sections being opaque to macros, is there a way of importing all the POP-11 language features which are implemented as macros?
Helen McCall.
|