Waldek,

Thanks for looking at this.

> > Some input processing invoked from the linux command line works as expected
> > in V16, e.g.
> >
> >    % pop11 :"charin()=>"
> >    : A
> >    ** 65
> >    % pop11 :"charin()=>"
> >    : 0
> >    ** 48
> >
> > But not this:
> >
> >    % pop11 :"readline()=>"
> >
> > prints the end of stream indicator:
> >
> >     ** <termin>
>
> I do not understand why you think that you should get anything different?

It works in 32 bit poplog, and can be used in certain complex applications
that start up by (implicitly) invoking pop11 with one of the permitted
command string formats mentioned in

    REF SYSTEM

Popracer startup does not use one of those formats. Instead it uses

    pop11 main.p

But when it compiles main.p it's clear that the text input procedures are
not working properly -- readline doesn't work -- so popracer loops forever
trying to get arguments from the user.

As popracer is somewhat complicated I tried to see if I could replicate
some of the difficulty without compiling a file, just using the command
string mechanism, to help isolate the stage at which the problem occurs.

I found I could produce a related problem, using just the command string,
not an input file, so probably having the same cause.

And I found that just as popracer works in Poplog V15 but not V16 some of
my command string tests worked in V15 but not V16.

I'll try to dig a bit deeper to work out at what stage in poplog's startup,
which is very complicated partly because of the variety of ways in which
programs can be started up (e.g. with or without loading a saved image, or
reading user's startup files, or getting input from a user to select
options, before doing anything else).

> 'readline()' reads from proglist and proglist is read from the same
> string as 'readline()=>'.  So we are at the end of input and '<termin>'
> is correct.

I think things are far more complex, in order to support various kinds of
functionality summarised above. Some the requirements are spelled out in
REF SYSTEM.

The problem is that in the buggy examples, readline is supposed to be set
to read from the terminal (e.g. rather than from code being compiled) and
it does not get set early enough to deal with that while processing a
command string. Something needs to switch between processing the command
string and getting input from the user. That works with charin, but not
with readline, which depends on charin and the itemiser (REF itemise).

Some of the information is in section 2 of REF SYSTEM.

2  Starting up Standard Language Systems

But it doesn't go down to the level of detail we are discussing, unless
I've missed something.

I'll do some more digging later by finding out more about the differences
in behaviour between V16 and V15.65 with minimal examples.

I guess most people reading this will not have V15.65. If anone wants to
get involved it can be obtained here:

    http://www.cs.bham.ac.uk/research/projects/poplog/latest-poplog

using the pre-linked poplog (because linking V15 basepop11 no longer works
in recent versions of linux).

More later.
Aaron

Reply via email to