bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: APL: GNU: How to output to a file?


From: knud van eeden
Subject: Re: APL: GNU: How to output to a file?
Date: Tue, 14 Feb 2023 02:42:35 +0000 (UTC)

Hello Jurgen,

So looking again into this.

It is definitely a bug of apl on Microsoft Windows is my current opinion.

No output to a file is or can be generated.

Tried e.g. 

g:\cygwin32\bin\apl.exe --noSV -f c:/temp/helloworld.apl >c:/temp/ddd.txt

g:\cygwin32\bin\apl.exe --noSV -s -f c:/temp/helloworld.apl >c:/temp/ddd.txt 2>&1

g:\cygwin32\bin\apl.exe --noSV -s -f c:/temp/helloworld.apl 2> c:/temp/ddd.txt

g:\cygwin32\bin\apl.exe --noSV -f c:/temp/helloworld.apl >c:/temp/ddd.txt 2>&1

...

Usually Cygwin programs running on Windows have the same behavior as on Linux, so this
is unexpected.

I am mainly interested in capturing the STDERR thus in order to debug errors.

This is e.g. the program used (helloworld.apl)

'Hello world'
df -df ----
)OFF

so the error thrown is

Hello world
VALUE ERROR
      df-df----
         ^

It is thus impossible to catch this error in a file.

===

Version of APL used:

c:\temp Tue 14-02-23 03:32:51>g:\cygwin32\bin\apl.exe --version
BUILDTAG:
---------
    Project:        GNU APL
    Version / SVN:  1.7 / Unversioned directory
    Build Date:     2017-03-17 16:02:24 UTC
    Build OS:       CYGWIN_NT-5.1 1.7.27(0.271/5/3) i686
    config.status:  unknown configure options
   Archive SVN:

===

As a next step: Is there maybe somewhere a latest pre-compiled binary executable version of Cygwin GNU APL.exe available somewhere?

Thanks
with friendly greetings
Knud van Eeden

===

On Monday, August 29, 2022 at 11:25:36 AM GMT+2, Dr. Jürgen Sauermann <mail@xn--jrgen-sauermann-zvb.de> wrote:


Hi Knud,

GNU APL prints to stdout and stderr like all other "normal" programs.

It might be, though, that under non-normal operating such as WINDOWS
the output gets lost for some reason.

I suppose that the shell used (e.g. cmd.exe vs. the cygwin shell) might
make a difference in that respect. The following works just fine in GNU/Linux:

eedjsa@server68:~/apl-1.8$
eedjsa@server68:~/apl-1.8$
eedjsa@server68:~/apl-1.8$
eedjsa@server68:~/apl-1.8$ cat test.apl   # prints ⍳10

⍳10
)OFF


eedjsa@server68:~/apl-1.8$ apl -s -f ./test.apl  > test.output
eedjsa@server68:~/apl-1.8$ cat test.output
1 2 3 4 5 6 7 8 9 10

eedjsa@server68:~/apl-1.8$
eedjsa@server68:~/apl-1.8$


Best Regards,
Jürgen


On 8/28/22 8:47 PM, knud van eeden wrote:
Hello,

1. apl.exe has a parameter to input a file.

2. E.g.

apl.exe -f youraplfilenamehere

E.g. 

 apl.exe -f helloworld.apl

3. But how to get the output of it?

4. There seems to be no command line parameter to set output to a file (run e.g. apl.exe --help to see and check that).

5. Also something like pipe '>' to a file gives no results.

E.g.

 apl.exe -f helloworld.apl >youroutputfilename

Can you please advise?

Thanks
with friendly greetings
Knud van Eeden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]