[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] Gnu APL Quad-Quote read coming from souce file and not the
From: |
Frederick H. Pitts |
Subject: |
Re: [Bug-apl] Gnu APL Quad-Quote read coming from souce file and not the terminal |
Date: |
Sun, 14 Sep 2014 17:17:01 -0500 |
Hello Juergen,
I cloned svn 472, configured and tried to build. I find that if
I configure with CORE_COUNT_WANTED=argv, the following compiler error
results:
Parallel.cc: In static member function 'static void
Parallel::init_CPUs(bool)':
Parallel.cc:333:7: 'uprefs' was not declared in this scope
uprefs.requested_cc; // parallel, as per --cc option
A similar but differ error occurs if I use CORE_COUNT_WANTED=syl.
If I configure without specifying CORE_COUNT_WANTED, the build
completes OK. However I'm still having the problem of the ⍞ reference
not reading from the terminal.
Something as simple as:
#!/usr/local/bin/apl --script --
⍝ ------------------------------
∇hello; X
⍞ ← 'What is your name? '
X ← ⍞
⎕ ← 'Hello ', ( X ≠ ' ' ) / X
∇
hello
)OFF
⍝ ------------------------------
demonstrates the issue. If the above is executed as a shell script with
./hello.apl
or the apl invocation
apl -f hello.apl
the ⍞ reference input is not coming from the terminal.
Regards,
Fred
On Sun, 2014-09-14 at 16:27 +0200, Juergen Sauermann wrote:
> Hi Fred,
>
> Thanks. I see some debug outout at the end of your file:
>
> hello
> What is your name?
> )SI not cleared at the end of ./hello.apl:
> hello[2] X ← ⍞
> ^
> ⋆ hello
> ^
>
> That debug output should only occur if a testcase file is executed and
> not for normal script file like your hello.apl. This should be fixed
> in SVN 472.
>
> ------
>
> Apart from that I can't really see what is wrong. The intended
> behavior (and the actual behavior on
> my box) is that GNU APL reads from input files as long as there are
> unprocessed files and switch
> to stdin after the last input file was processed.
>
> In your case, hello.apl defines function hello and calls it on the
> last line of hello.apl.
> After having read the last line of hello.apl, the next input is read
> from stdin:
>
> hello ← from script
> What is your name? Jürgen ← from stdin
> Hello Jürgen
>
> If your box behaves differently then I need more details.
>
> /// Jürgen
>
>
>
> On 09/13/2014 03:31 AM, Frederick H. Pitts wrote:
>
> > Gentle people,
> >
> > As of SVN 470, ⍞ references are taking their input from the APL source
> > file instead of the terminal if there is any source file left to be
> > read. It appears that the interpreter is starting to execute code
> > before the interpreter has completely consumed the source file and is
> > confusing the file input stream with the terminal stream.
> >
> > A file that demonstrates the error is attached.
> >
> > Regards,
> >
> > Fred
> >
>
- [Bug-apl] Gnu APL Quad-Quote read coming from souce file and not the terminal, Frederick H. Pitts, 2014/09/12
- Re: [Bug-apl] Gnu APL Quad-Quote read coming from souce file and not the terminal, Juergen Sauermann, 2014/09/14
- Re: [Bug-apl] Gnu APL Quad-Quote read coming from souce file and not the terminal,
Frederick H. Pitts <=
- Re: [Bug-apl] Gnu APL Quad-Quote read coming from souce file and not the terminal, Juergen Sauermann, 2014/09/15
- Re: [Bug-apl] Gnu APL Quad-Quote read coming from souce file and not the terminal, Frederick H. Pitts, 2014/09/15
- Re: [Bug-apl] Gnu APL Quad-Quote read coming from souce file and not the terminal, Juergen Sauermann, 2014/09/16
- Re: [Bug-apl] Gnu APL Quad-Quote read coming from souce file and not the terminal, Frederick H. Pitts, 2014/09/16
- Re: [Bug-apl] Gnu APL Quad-Quote read coming from souce file and not the terminal, Juergen Sauermann, 2014/09/17