I would be grateful if someone can tell me the secret to function
creation in apl2c.
Thanks,
Ken
NILLADIC_WITH_NO_RESULT
RESULT <- NILLADIC_WITH_RESULT
MONADIC_WITH_NO_RESULT RIGHT_ARGUMENT
RESULT <- MONADIC_WITH_RESULT RIGHT_ARGUMENT
LEFT_ARGUMENT DYADIC_WITH_NO_RESULT RIGHT_ARGUMENT
RESULT <- LEFT_ARGUMENT DYADIC_WITH_RESULT RIGHT_ARGUMENT
Any of these forms can be followed by a semi-colon delimited list of local
names.
David Liebtag
PS. Sorry if you already knew all this.
Thanks for the reply. I've tried various of those, both upper and
lower case, and I can't make apl2c happy.
For instance:
[0] FOO
[1] 42
(The [0] is inserted by the editor; I'm not typing it.)
or
[0] r<-foo
[1] r<- 42
(where <- is an arrow of course)
Whatever I try, I get Definition error in line 0.
Ken
{shift}{enter}
[0] R<-FOO{enter}
[1] R<-10{enter}
[2] {shift}{enter}
FOO
APL2C can be finicky. Can you {Quad}FX a simple function? Perhaps
something in the workspace/install is messed up.
...Paul Houle
<kens....@gmail.com> wrote in message
news:98fdae79-1c3d-42df...@w39g2000prb.googlegroups.com...
Thanks for the detailed instructions. Unfortunately, I still get
"Declaration error in line 0". I tried installing on a different
machine, but got the same thing. What version are you running? (I'm
using 5.0.4 from Help->About)
>
> APL2C can be finicky. Can you {Quad}FX a simple function? Perhaps
> something in the workspace/install is messed up.
{Quad}FX works just fine, strangely enough. I guess that's a
workaround.
Ken
> ...Paul Houle
Perhaps it is something in your APL2C Setup (though I'm not sure what). As
for me:
Setup->keyboard == APL classic style - English keyboard
Setup->font == APL2C Bold 12 (don't ask me why the font would
matter)
Setup->character encoding == APL2C character encoding
Setup->ascii tokens == off
Setup->ascii token definitions == Standard
Setup->compiler == Microsoft Visual C++
Not sure what else could differ between us. I use Microsoft XP
Professional.
There may be some issue with different OS's; also, there is an installation
incompatibility with multi-core CPU's as well.
Perhaps the author of APL2C could help you. You might try:
con...@apl2c.com
Dr. Tilman Otto was very helpful to me in the past when I was developing a
freeware application with his compiler.
But I don't think he is actively supporting it now.
...Paul Houle
<kens....@gmail.com> wrote in message
news:66d68d5d-0189-4065...@b30g2000prf.googlegroups.com...
My version is also 5.0.4.
I've defined functions in the past, but today I'm seeing the same problems
as the original poster. And I have to force APL2C to quit using Task
Manager.
Never did like the way its function editor was so pernickety - defining
"something", even if it's "bad" and needs sorting out later, seems to me a
valid approach to building code.
The good news is that there are other low-cost APLs out there which aren't
so "delicate". I didn't find any good reason for doing very much with
APL2C (its USP of generating C code didn't do much for me). Pity, in a
way, because having alternative interpreters feels like a good thing for
the APL user.
"Paul Houle" <asm...@yahoo.com> wrote in
news:lleik.16276$mh5....@nlpi067.nbdc.sbc.com:
> Ken,
> I am running version 5.03. [... deleted ...]
I downloaded 5.0.4 off the apl2c website; it seems to be the only
version currently available.
> Perhaps it is something in your APL2C Setup (though I'm not sure what). As
> for me:
>
> Setup->keyboard == APL classic style - English keyboard
> Setup->font == APL2C Bold 12 (don't ask me why the font would
> matter)
> Setup->character encoding == APL2C character encoding
> Setup->ascii tokens == off
> Setup->ascii token definitions == Standard
> Setup->compiler == Microsoft Visual C++
>
> Not sure what else could differ between us. I use Microsoft XP
> Professional.
Thanks for the detailed setup information. I tried your setup values
on XP, and also tried installing on a different machine, and no luck.
So it seems like function editing in 5.0.4 doesn't work :-(
(By the way, you can't exit apl2c while in this bad function edit
state. The way to get out is hit Esc.)
Ken
What is FOO in the workspace? It should NOT be a variable. If it is
erase it first or rename your fn name to something else.
Stack pending could be a problem too. I don't know APL2C but there is
a )RESET command in most other APLs. You can use it if you have a
stack pending.