Thanks for checking this out so promptly.

> It would be useful to know what you get from:
>
> pop11 :"readline()=>1 + 1"
>
> in V15.

In V15

    % pop11 :"readline()=>1 + 1"
    ? hi there
    ** [hi there]

Also this may be illuminating:

    % pop11 :"readline()=>1 + 1 =>"
    ? hi there
    ** [hi there]
    ** 2

Showing clearly that in that context readline is redirected to the
terminal, though the rest of the command string is processed afterwards,
presumably by a temporarily suspended compilation process (suspended during
invocation of readline).

[Discussed further below.]

Contrast V16

    % pop11 :"readline()=>1 + 1 =>"
    ** [1 + 1 =>]

which shows that readline is looking for text in the argument string, not
terminal input.

> Also, if you get the same results using 'corepop' (that
> is without involving saved images).

I had not thought of trying that.

Strangely in V15.65 it behaves like V16:

    % corepop :"readline()=>1 + 1 =>"
    ** [1 + 1 =>]

    % corepop :"readline()=>"
    ** <termin>

But:

    % corepop :"charin()=>"
    : K
    ** 75

Contrast (still V15):

    % corepop ":cucharin()=>"
    ** <termin>

    % corepop ":cucharin()=> AB"
    ** 65
    ;;; DECLARING VARIABLE B

And V16 -- slightly different:

    % corepop ":cucharin()=> AB"
    ** 65
    ;;; DECLARING VARIABLE B
    ;;; PRINT DOING
    ;;; DOING    :


I haven't checked all cases, but my impression is that basepop11 and
corepop behave similarly. So in this context corepop and basepop11 in V15
behave like pop11 in V16.

But pop11 in V15 behaves differently. Since pop11 is an abbreviation for

    basepop11 +startup

it follows that something in the code in $usepop/pop/lib/startup.psv
is changing argument line processing. So we have to look at the extra
files used by mkstartup

=========================

The above indicates that in V15 something happens in the code used to
produce the startup.psv saved image (invoked by the pop11 command) that
changes the handling of a quoted string in the command line.

This may be a clue, in REF SYSTEM

----------------------------------------
2  Starting up Standard Language Systems
----------------------------------------

The base Poplog executable is the file

         $popsys/basepop11       (Unix)
         popsys:basepop11        (VMS)

This can be invoked directly under the name "basepop11", but more  often
than not, entry  to Poplog  is via one  of the  four language  subsystem
commands:

    pop11
    prolog
    clisp
    pml

These are all defined  to run the base  executable together with one  or
more layered saved images appropriate to the particular language.

Command definitions are set up by the Poplog login file:

         $usepop/pop/com/popenv          (Unix)
         usepop:[pop.com]popenv.com      (VMS)

The "pop11" command definition is equivalent to:

         basepop11 +$popsavelib/startup  (Unix)
         basepop11 +popsavelib:startup   (VMS)

The other languages are layered on top of "pop11": the "pml" command for
example (for running Poplog ML) is equivalent to:

etc....

All four language systems can be run in three different modes:

    (1) execute expression mode

    (2) compile file mode

    (3) interactive mode

On startup, they all call  the procedure syssetup, which checks  whether
there is a further as yet unprocessed argument in poparglist, and if so,
processes it as follows:

 o  If the argument is one of

        ved help teach ref doc

    then this indicates  normal interactive startup  but inside the  Ved
    editor (with the given Ved command).  The next argument (if any)  is
    taken as a filename argument for the Ved command. E.g,

        prolog ved myfile.pl

 o  Otherwise, if the first character of  the argument is `:`, mode  (1)
    is chosen. The rest of the argument is treated as a string of source
    text, and  is  compiled. The  system  then exits.  (Note:  arguments
    containing `:`  usually have  to be  quoted, on  both Unix  and  VMS
    systems). E.g,

        pop11 ":1+2=>"

 o  Any other argument is  interpreted as the name  of a source file  to
    compile (i.e.  mode  (2)).  If  the filename  does  not  include  an
    explicit  directory,  the  directories  given  by  the   environment
    variable 'popcomppath' are searched  (see below). Again, the  system
    exits once the file has been compiled. E.g,

....
===

So it looks as if syssetup (described in REF subsystem) is what changes how
the command line is processed, between corepop11, and pop11

I've just compared $usepop/pop/src/syssetup.p in V15 and V16 and they are
identical apart from white space changes (in V16 all tabs have been
expanded to spaces).

I have noticed one call of

    Check_integer(pfield, 16:100);

in

define sys_subsystems_init(pfield);

Is it possible that that needs to be changed for 64 bit poplog?
I haven't looked at what pfield is or does.

I haven't tried to work out the implications.

It may be necessary to look more closely at exactly what goes into
$usepop/pop/lib/psv/startup.psv

to see if something needs to change for 64bit addresses, integers, etc.

The system sources don't seem to have enough comments to help with
debugging.

Aaron

Reply via email to