bug-apl
[Top][All Lists]
Advanced

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

Error message references wrong line


From: Hans-Peter Sorge
Subject: Error message references wrong line
Date: Wed, 6 Mar 2024 15:24:26 +0100
User-agent: Mozilla Thunderbird

Hi,

Just for fun i did some "Home work" for my wife.
Kids in  school were to guess (and calculate) numbers.
For the calculation part I came up with an APL Funktion (No more school - right ?-).

[0]   Mathe_Bug
[1]   L←278 213 1046 2884 391
[2]   R←87 32 49 479 324
[3]   E←L∘.× R  ⍝ Possible calculations (25 all together for the kids to guess which one is close to the results given. )
[4]   M←L∘.,R   ⍝ for display
[5]   V←92288 76246 90072 102027 51254 34017  ⍝  Six result "proposals"
[6]   X←E ∊¨⊂ V    ⍝ We do no guessing. See what really fits.  0 - no,   1 - yes
[7]  ⍝ buggy code to come:
[8]   (' - ' '(X)'[1+ X]),¨ ((⊂5 0)⍕¨M) ,¨ (⊂9 0)⍕¨E  ⍝  Make it looking nice -
    ∇
      Mathe_Bug
RANK ERROR
Mathe_Bug[8]  X←Eϵ¨⊂V
              ^
The error in line 8 is (' - ' '(X)'[1+ X])
missing a pair of "()": ((' - ' '(X)')[1+ X])
However the expression from line [6] gets displayed.

Best Regards
Hans-Peter

reply via email to

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