bug-apl
[Top][All Lists]
Advanced

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

Re: Multilines with APL character


From: Bill Daly
Subject: Re: Multilines with APL character
Date: Sun, 24 Nov 2019 17:39:24 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1

I played with this and I have a work around:

      )copy 1 utl
      ⍝ Testing reveals curious string
      t2←⊃utl∆convertStringToNumber ¨ t3←"""
→      1 2 3
→      4 ¯5 6
→      """
      ⍴t3
2
      2⊃t3
4 \xaf5 6
      ⍝ Works with a dash
      t1←⊃{utl∆convertStringToNumber ¨ ' ' utl∆split ⍵}¨"""
→      1 -2 3
→      4 5 6
→      """
      t1
1 ¯2 3
4  5 6
      utl∆numberp t1
1

utl∆convertStringToNumber is a function in my apl-library available at https://sourceforge.net/projects/apl-library/

w

On 11/24/19 7:51 AM, David Tran wrote:
Hi,

I try use multi-lines style to input a matrix (number) as code below, it works if they are not "negative" number. Is there a way to make negative number works? or it is just the way how multilines style works ("special" char to hex presentation)?

      ⎕ ← 2 3 ⍴∊⍎¨"""
→      1 2 3
→      4 5 6
→      """
1 2 3
4 5 6

      ⎕ ← 2 3 ⍴∊⍎¨"""
→      1 ¯2 3
→      4 5 6
→      """
VALUE ERROR in macro ⍎¨
      μ-Z__EXEC_EACH_B '1 \xaf2 3' '4 5 6'
      ^                                  ^


Thanks,
Dave


reply via email to

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