bug-apl
[Top][All Lists]
Advanced

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

Re: ending/stopping a script


From: enztec
Subject: Re: ending/stopping a script
Date: Sun, 13 Jun 2021 11:33:30 -0600

Hi


not sure exactly what to do here with the ⎕STOP code

 > cat script3

#! script3

'1 aaaaaa'

∇STOP
 'STOP CALLED'
∇

1 ⎕STOP 'STOP' ⍝ no output

'2 aaaaaa'

STOP  ⍝ outputs  STOP[1] but execution continues

'3 aaaaaa'

1 ⎕STOP STOP  ⍝ outputs STOP[1] but execution continues

'4 aaaaaa'

⍝ stops execution and ws stays open    outputs      IO_Files::open_next_file(): 
no more files
]NEXTFILE

'5 aaaaaa'

⍝ stops exeuction and ws stays open    outputs      IO_Files::open_next_file(): 
no more files
]nextfile

'6 aaaaaa'



> /usr/local/bin/apl        loads clear ws

      )copy script3
DUMPED 2021-06-13  11:26:23 (GMT-6)
1 aaaaaa
2 aaaaaa
STOP[1]
3 aaaaaa
STOP[1]
4 aaaaaa
IO_Files::open_next_file(): no more files




On Sat, 12 Jun 2021 11:36:02 +0200
Dr. Jürgen Sauermann <mail@xn--jrgen-sauermann-zvb.de> wrote:

> Hi,
>
> ]NEXTFILE would be my first choice also.
>
> Alternatively you could think of defining a dummy function like:
>
> ∇STOP
>  'STOP CALLED'
>
>
> and set ⎕STOP to its first line:
>
> 1 ⎕STOP 'STOP'
>
> or so,
>
> The difference is that ]NEXTFILE closes the script file, while
> ⎕STOP only stops execution (so you can continue execution
> in the same script after making some changes).
>
> Best Regards,
> Jürgen
>
>
>
> On 6/12/21 5:46 AM, Kacper Gutowski wrote:
> On Fri, Jun 11, 2021 at 08:27:58PM -0600, enztec@gmx.com wrote:
> )off ends the apl session completely - i want to keep the ws open and just 
> end the script execytuib and then edit the script in directory (and move 
> around the '→0' or what ever can end the script execution - for debug) and 
> then )copy the edited script back into the ws and it runs until it hits the 
> '→0'
>
> Maybe something like ]NEXTFILE then.
>
> -k
>
>



reply via email to

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