bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Strange domain error


From: Blake McBride
Subject: Re: [Bug-apl] Strange domain error
Date: Tue, 10 Jun 2014 14:08:47 -0500

It is funny because I call this function a lot.  Sometimes it works, other times it gives me the domain error.  Here are some more facts:

DOMAIN ERROR
Tmfmt[1]  z←(2 0⍕⍉d[,1;]),':',2 0⍕⍉(d←(2⍴100)⊤,d)[,2;]
                              ^   ^
      d
2
0
      ⍴d
2 1
      0↑0⍴d

      →
      )SI
      Time
 2:03 PM
      S∆Tmfmt←1
      Time
Tmfmt[1]
      d
203
      ⍴d

      1↑0⍴d
0
      S∆Tmfmt←⍳0
      →1
 2:03 PM




On Sat, Jun 7, 2014 at 5:16 PM, Blake McBride <address@hidden> wrote:
Given:

      ∇Time[⎕]∇
    ∇
[0]   z←Time
[1]   z←(,Tmfmt 100⊥((12|z[1])+(12×0=12|z[1])),z[2]),(2 3⍴' AM PM')[1+(z←⎕TS[4 5])[1]≥12;]
    ∇
      ∇Tmfmt[⎕]∇
    ∇
[0]   z←Tmfmt d
[1]   z←(2 0⍕⍉d[,1;]),':',2 0⍕⍉(d←(2⍴100)⊤,d)[,2;]
[2]   z←z[;1],(0 ¯1+⍴z)⍴¯1 0↓(d=' ')⊖(d←,0 1↓z),[0.5]'0'
    ∇


      )SI
      Time
DOMAIN ERROR
Tmfmt[1]  z←(2 0⍕⍉d[,1;]),':',2 0⍕⍉(d←(2⍴100)⊤,d)[,2;]
                              ^   ^
      →
      Time
 5:14 PM


I have no idea why I got a domain error.

Thanks.

Blake




reply via email to

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