bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] QUAD QUOTE, QUAD PR and nested arrays


From: Juergen Sauermann
Subject: Re: [Bug-apl] QUAD QUOTE, QUAD PR and nested arrays
Date: Sun, 19 Feb 2017 17:42:24 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi Frederick,

I have looked into the functins that you mentioned and also into the description
given n the programmers guide.

However, I was not able to really understand what they say. In particular what the expected behaviour of
GNU APL is. In the language reference they always talk about characters and never about nested values.
So in your example below what is the expected value? Is it:

 CHOOSE PLACE FILL OR STOCK :  FILL
FILL
 CHOOSE PLACE FILL OR STOCK : FILL
FILL
? Completely lost,

Jürgen


On 02/17/2017 06:08 PM, Frederick Pitts wrote:
Hello Juergen,

    In the interest of making Gnu APL as compatible as practical with
IBM APL2, please consider the following:

    The IBM APL2 quad quote prompt replacement facility supports the
prompt being a nested array.  I make that claim based on the APL code
for the parts inventory demo presented on page 100 of the IBM 'APL2
Programming: Guide'.  Please examine the 'menu' and 'input'
functions.  The prompt created by the 'menu' function is a nested
array.

    The Gnu APL quad quote prompt replacement facility only performs
replacement on primitive character arrays and leaves nested arrays
unchanged.  I make that assertion based on the attached 'TEST.apl'
which was created by lifting the first 5 lines (including header) of
the 'input' function from the parts inventory demo above and adding
code to exercise the function.

    If you run 'TEST.apl' and type 'FILL' (without the quotes) at the
two prompts, you should see

 CHOOSE PLACE FILL OR STOCK :  FILL
 CHOOSE PLACE FILL OR STOCK :  FILL
 CHOOSE PLACE FILL OR STOCK : FILL
FILL

The first two lines result from using a prompt generated with nested
array; the second two lines from a simple character array.

Regards,

Fred


reply via email to

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