bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Suggested change in rendering of ⎕CR


From: Hans-Peter Sorge
Subject: Re: [Bug-apl] Suggested change in rendering of ⎕CR
Date: Wed, 13 Apr 2016 21:14:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1

Hi,

this looks more like a comma separated value list ( fds ⎕CSV Array )

fds: field delimiter string like
fds←' ",;≡'

fds[1] ←→ Numeric field quote   -
          alt ⊂'()' or other brackets to output (field)
fds[2] ←→ Character field quote -
          alt ⊂'<>' or other brackets to output <field>
fds[3] ←→ Field delimiter
fds[4] ←→ Record delimiter      -
          alt ⊂'{}' or other brackets to output {f1,f2}
fds[5] ←→ Rank delimiter
          on a separate line.
          One line shape 3,
          two lines shape 4, .....

Just my thoughts.

Greetings
HP


Am 13.04.2016 um 20:07 schrieb Juergen Sauermann:
> Hi,
> 
> I can look into this. However, how shall we handle character arrays with
> rank > 1?
> Quotes on every line or one quote at the beginning and one at the end
> (for example)?
> 
> If the problem is distinguishing numbers and characters then we could
> also use a different
> frame type (like bold or double-line for characters). That would also be
> closer to the "normal"
> display of APL values (the quotes are input-only).
> 
> /// Jürgen
> 
> 
> On 04/13/2016 02:38 PM, Elias Mårtenson wrote:
>>
>> I agree, and specifically I'd suggest using double quotes for an
>> encapsulated array of characters, while using single quotes to
>> indicate the difference between characters and numbers inside an array.
>>
>> This would be analogous with the GNU APL extension where double quotes
>> ensures arrays even for single characters.
>>
>> I'm on mobile now so I can't really make any good examples. But I'm
>> hoping you'll understand what I mean.
>>
>> Regards,
>> Elias
>>
>> On 13 Apr 2016 8:26 p.m., "Blake McBride" <address@hidden
>> <mailto:address@hidden>> wrote:
>>
>>     Off the cuff, it seems like putting quotes around strings is a
>>     really good idea.  How else would you tell the difference between
>>     123 and "123"?
>>
>>     Blake
>>
>>     On Wed, Apr 13, 2016 at 2:34 AM, Elias Mårtenson
>>     <address@hidden <mailto:address@hidden>> wrote:
>>
>>         Given the following expression:
>>
>>         *      8⎕CR 2 2⍴10 'foo' 20 'bar'*
>>         ┌→───────┐
>>         ↓10 ┌→──┐│
>>         │   │foo││
>>         │   └───┘│
>>         │20 ┌→──┐│
>>         │   │bar││
>>         │   └───┘│
>>         └∊───────┘
>>
>>         The combination of strings and numbers in the array isn't very
>>         pretty.
>>
>>         I'd like to suggest that it renders as following instead:
>>
>>         ┌→───────┐
>>         ↓   ┌→──┐│
>>         │10 │foo││
>>         │   └───┘│
>>         │   ┌→──┐│
>>         │20 │bar││
>>         │   └───┘│
>>         └∊───────┘
>>
>>         I would also like to see another ⎕CR mode that would render it
>>         like below, as this would make displaying arrays with lots of
>>         strings (in my case, database table content) much easier to read:
>>
>>         ┌→───────┐
>>         ↓10 "foo"│
>>         │20 "bar"│
>>         └∊───────┘
>>
>>         Jürgen, what's your opinion on this?
>>
>>         Regards,
>>         Elias
>>
>>
> 




reply via email to

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