Functions don't suspend with Ctrl+Break, they just exit

If we don't know about 'em, we can't fix 'em.

Functions don't suspend with Ctrl+Break, they just exit

PostPosted by ItzRav » Sun Mar 19, 2017 11:02 am

Code: Select all
      ⎕SYSVER
0.5.2.0  Sun Mar 19 01:50:22 2017  Win/64

      ⎕vr 'foo'
    ∇ foo;t                   
[1]   t←⎕T                     
[2]   :WHILE 5>⎕T-t ⋄ :ENDWHILE
[3]   'got here'               
    ∇

⍝ When you execute this function, if you wait the full 5 seconds,
⍝ it correctly gets to the last line and displays 'got here'.
     
      foo ⍝ Wait 5 seconds
got here

⍝ But if you execute it and press Ctrl+Break before the 5 seconds
⍝ is up, it appears to stop on line [2] (as it should), then it displays
⍝ foo[2] again, then displays the original immediate execution line,
⍝ and the function is not suspended at all, which it should be.
     
      foo ⍝ Press Ctrl+Break before 5 seconds
foo[2]
foo[2]
      foo ⍝ Press Ctrl+Break before 5 seconds
     
      )si
⍝ )si displays nothing, function isn't suspended.

⍝ I also tried this with :REPEAT :UNTIL, and the same thing happened.
⍝ I assumed it was an issue with control structures themselves, but the
⍝ same thing happens with this function if you press Ctrl+Break before
⍝ the matrix inversion completes:

    ∇ foo
[1]   0 0⍴⌹350 350⍴10000?1000000
[2]   'got here'
    ∇

      foo
foo[1]
foo[1]
      foo


ItzRav
 
Posts: 26
Joined: Wed Jan 01, 2014 2:02 pm
Location: Bethesda, MD

Re: Functions don't suspend with Ctrl+Break, they just exit

PostPosted by forummaster » Sat Apr 08, 2017 7:45 pm

Thanks for the bug report. It should be fixed in the latest Alpha version:

http://www.nars2000.org/download/binaries/alpha/
forummaster
 
Posts: 555
Joined: Wed Jan 23, 2013 1:00 pm


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron