Thanks.  While it appears to work, it's clearly wrong.  The formatting is
still being done at the wrong place.  The way I discovered this is to load
a .apl file from a prior version of GNU APL.  When I list the function,
it's wrong.  So, GNU APL is depending on the format in the file rather than
having the del editor format it.  For example:

      )load Utils.apl
DUMPED 2019-10-27  12:10:43 (GMT-6)
      ∇Pin[⎕]∇
    ∇
[0]   n←v Pin q;m;t
[1]    ⍝ Input one or more numbers
[2]    ⍝ v[1] = minimum value (inclusive)
[3]    ⍝ v[2] = maximum value (inclusive)
[4]    ⍝ v[3] = numeric increment (i.e. 1 = integer)
[5]    ⍝ Remining values are optional
[6]    ⍝ v[4] = minimum number of numbers
[7]    ⍝ v[5] = maximum number of numbers
[8]    ⍝ v[6] = default value of empty entry (or ¯1 means no default)
[9]    ⍝ v[7+] = numbers the entered value cannot be
[10]   ⍝ q is the prompt
[11]   t←⍳0
[12]   ⍎(3=⍴v)/'v←v,1 1'
[13]   m←v[5]
[14]   LP:→(m=⍴t)/EN3
[15]   EN1:→(EHN n←CS PI q,'?')/0,0,EN2
[16]   →(v[⍳5]Lck n)/EN1
[17]   n[Omega n='-']←'¯'
[18]   →(∨/(n←⍎n)∈6↓v)/ER1
[19]   t←t,n
[20]   v[5]←v[5]-⍴,n
[21]   →LP
[22]   EN2: →(0≠⍴t)/EN3
[23]   →(5=⍴v)/0
[24]   →(v[6]=¯1)/0
[25]   t←v[,6]
[26]   EN3:⍎'n←',((m=1)/'''''⍴'),'t'
[27]   →0
[28]   ER1:→EN1 ∆ ER(⍕n), ' already exists; Please reenter.'
    ∇

Thanks!

Blake



On Wed, Apr 8, 2020 at 10:58 AM Dr. Jürgen Sauermann <
mail@jürgen-sauermann.de> wrote:

> Hi Blake,
>
> thanks, hopefully fixed in *SVN 1256*.
>
> Best Regards,
> Jürgen
>
>
>
> On 4/8/20 4:18 PM, Blake McBride wrote:
>
> Also, and further showing the point that the formatting is occurring at
> the wrong place:
>
>       ⎕CR 'ABC'
> ABC
>  x←4
>  EN1: Y←5
>  Z←7
>  ⍝ THIS IS A COMMENT
>  Z←5
>
> Those space characters before each line should never happen but does when
> the file is loaded from a .APL file.
>
> Thanks!
>
> Blake
>
>
>
>
>
> On Wed, Apr 8, 2020 at 8:56 AM Blake McBride <blake1...@gmail.com> wrote:
>
>> Lastly, I should mention that the first display of ABC is the correct
>> one, and the one that matched IBM APL.
>>
>> Thanks.
>>
>> Blake
>>
>>
>> On Wed, Apr 8, 2020 at 8:46 AM Blake McBride <blake1...@gmail.com> wrote:
>>
>>> Greetings,
>>>
>>> Echoing some thoughts I've had on this subject, given the trouble we've
>>> had with function formatting over the years between the del editor and ⎕CR,
>>> I get the impression that function formatting is occurring at the wrong
>>> place.  I think internally functions should be stored left-justified
>>> always.  The del editor would then be the one adding the formatting for
>>> comments and labels.  This way there wouldn't be ongoing problems between
>>> the del editor, save, dump, and ⎕CR.
>>>
>>> Thanks.
>>>
>>> Blake
>>>
>>> On Wed, Apr 8, 2020 at 8:36 AM Blake McBride <blake1...@gmail.com>
>>> wrote:
>>>
>>>> Greetings,
>>>>
>>>> Look at the formatting.  In particular look at how the lines with
>>>> labels and comments are indented.  They are indented differently depending
>>>> on whether the file is saved or dumped.
>>>>
>>>>       ∇ABC[⎕]∇
>>>>     ∇
>>>> [0]   ABC
>>>> [1]   X←4
>>>> [2]  EN1: Y←5
>>>> [3]   Z←7
>>>> [4]  ⍝ THIS IS A COMMENT
>>>> [5]   Z←5
>>>>     ∇
>>>>       )save test
>>>> 2020-04-08  08:30:48 (GMT-5)
>>>>       )dump test
>>>> 2020-04-08  08:30:52 (GMT-5)
>>>>       )load test
>>>>
>>>> WARNING: filename /home/blake/workspaces/test
>>>>     is ambiguous because another file
>>>>     /home/blake/workspaces/test.apl
>>>>     exists as well. Using the first.
>>>>
>>>> SAVED 2020-04-08 08:30:48 (GMT-5)
>>>>       ∇ABC[⎕]∇
>>>>     ∇
>>>> [0]   ABC
>>>> [1]   X←4
>>>> [2]  EN1: Y←5
>>>> [3]   Z←7
>>>> [4]  ⍝ THIS IS A COMMENT
>>>> [5]   Z←5
>>>>     ∇
>>>>       )load test.apl
>>>> DUMPED 2020-04-08  08:30:52 (GMT-5)
>>>>       ∇ABC[⎕]∇
>>>>     ∇
>>>> [0]   ABC
>>>> [1]    X←4
>>>> [2]    EN1: Y←5
>>>> [3]    Z←7
>>>> [4]    ⍝ THIS IS A COMMENT
>>>> [5]    Z←5
>>>>     ∇
>>>>
>>>> Thanks!
>>>>
>>>> Blake
>>>>
>>>>
>

Reply via email to