• Re: Doing ABORT" interactively

    From none) (albert@21:1/5 to minf...@arcor.de on Tue Jun 28 11:57:54 2022
    In article <74577042-a1c8-4ec1-bfae-226b289bc9b3n@googlegroups.com>, minf...@arcor.de <minforth@arcor.de> wrote:
    I am getting addlebrained...

    : T abort" kkk" ; ok
    0 t ok 1
    1 t
    *the terminal*:3:4: error: kkk
    1 >>>t<<<
    Backtrace:
    kernel/basics.fs:269:17 0 $6FFFFF7F78B8 throw >*terminal*:1:12 1 $6FFFFF877220 c(abort")

    What's wrong?

    That is more or less it is supposed to work.
    The error "kkk" is mentioned, and the Forth gives you some more
    information that could be useful.

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to All on Tue Jun 28 02:44:13 2022
    I am getting addlebrained...

    : T abort" kkk" ; ok
    0 t ok 1
    1 t
    *the terminal*:3:4: error: kkk
    1 >>>t<<<
    Backtrace:
    kernel/basics.fs:269:17 0 $6FFFFF7F78B8 throw
    *terminal*:1:12 1 $6FFFFF877220 c(abort")

    What's wrong?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to none albert on Tue Jun 28 03:18:51 2022
    none albert schrieb am Dienstag, 28. Juni 2022 um 11:57:59 UTC+2:
    In article <74577042-a1c8-4ec1...@googlegroups.com>,
    minf...@arcor.de <minf...@arcor.de> wrote:
    I am getting addlebrained...

    : T abort" kkk" ; ok
    0 t ok 1
    1 t
    *the terminal*:3:4: error: kkk
    1 >>>t<<<
    Backtrace:
    kernel/basics.fs:269:17 0 $6FFFFF7F78B8 throw
    *terminal*:1:12 1 $6FFFFF877220 c(abort")

    What's wrong?
    That is more or less it is supposed to work.
    The error "kkk" is mentioned, and the Forth gives you some more
    information that could be useful.

    Gosh, yes. Addlebrained I am. :o(

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to minf...@arcor.de on Thu Jun 30 08:02:32 2022
    On Tuesday, June 28, 2022 at 12:18:54 PM UTC+2, minf...@arcor.de wrote:
    That is more or less it is supposed to work.
    The error "kkk" is mentioned, and the Forth gives you some more
    information that could be useful.
    Gosh, yes. Addlebrained I am. :o(

    Sir, I have a complaint about your theater. Every time I enter a door labeled "EXIT"
    I end up outside. ;-)

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to the.bee...@gmail.com on Thu Jun 30 09:17:12 2022
    the.bee...@gmail.com schrieb am Donnerstag, 30. Juni 2022 um 17:02:35 UTC+2:
    On Tuesday, June 28, 2022 at 12:18:54 PM UTC+2, minf...@arcor.de wrote:
    That is more or less it is supposed to work.
    The error "kkk" is mentioned, and the Forth gives you some more information that could be useful.
    Gosh, yes. Addlebrained I am. :o(
    Sir, I have a complaint about your theater. Every time I enter a door labeled "EXIT"
    I end up outside. ;-)

    Even worse, I have been roaming in the 2nd floor. ;-)
    (ABORT" behind a long forgotten exception frame..)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Fri Jul 1 12:49:17 2022
    On 1/07/2022 01:02, Hans Bezemer wrote:
    On Tuesday, June 28, 2022 at 12:18:54 PM UTC+2, minf...@arcor.de wrote:
    That is more or less it is supposed to work.
    The error "kkk" is mentioned, and the Forth gives you some more
    information that could be useful.
    Gosh, yes. Addlebrained I am. :o(

    Sir, I have a complaint about your theater. Every time I enter a door labeled "EXIT"
    I end up outside. ;-)

    Except in this case it's finding the EXIT. Theatres that obscure exits
    would be in breach of safety laws. I recently re-evaluated what my
    compiler spits out on error and concluded 'less is more'.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to minf...@arcor.de on Fri Jul 1 08:14:01 2022
    In article <f15c3df7-d0f6-4848-8ed6-39ecfb8e81d0n@googlegroups.com>, minf...@arcor.de <minforth@arcor.de> wrote:
    the.bee...@gmail.com schrieb am Donnerstag, 30. Juni 2022 um 17:02:35 UTC+2: >> On Tuesday, June 28, 2022 at 12:18:54 PM UTC+2, minf...@arcor.de wrote:
    That is more or less it is supposed to work.
    The error "kkk" is mentioned, and the Forth gives you some more
    information that could be useful.
    Gosh, yes. Addlebrained I am. :o(
    Sir, I have a complaint about your theater. Every time I enter a door labeled "EXIT"
    I end up outside. ;-)

    Even worse, I have been roaming in the 2nd floor. ;-)
    (ABORT" behind a long forgotten exception frame..)

    I have made ABORT" a loadable extension in ciforth.
    If you intend to use it, you better mean it.

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to none albert on Thu Jun 30 23:19:07 2022
    On Friday, July 1, 2022 at 8:14:04 AM UTC+2, none albert wrote:
    In article <f15c3df7-d0f6-4848...@googlegroups.com>,
    minf...@arcor.de <minf...@arcor.de> wrote:
    the.bee...@gmail.com schrieb am Donnerstag, 30. Juni 2022 um 17:02:35 UTC+2: >> On Tuesday, June 28, 2022 at 12:18:54 PM UTC+2, minf...@arcor.de wrote:
    That is more or less it is supposed to work.
    The error "kkk" is mentioned, and the Forth gives you some more
    information that could be useful.
    Gosh, yes. Addlebrained I am. :o(
    Sir, I have a complaint about your theater. Every time I enter a door labeled "EXIT"
    I end up outside. ;-)

    Even worse, I have been roaming in the 2nd floor. ;-)
    (ABORT" behind a long forgotten exception frame..)
    I have made ABORT" a loadable extension in ciforth.
    If you intend to use it, you better mean it.

    "This computer will self destruct in 10 seconds. 9, 8, 7, 6.."
    ;-)

    Hans Bezemer
    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Fri Jul 1 19:46:16 2022
    On 1/07/2022 16:19, Hans Bezemer wrote:
    On Friday, July 1, 2022 at 8:14:04 AM UTC+2, none albert wrote:
    In article <f15c3df7-d0f6-4848...@googlegroups.com>,
    minf...@arcor.de <minf...@arcor.de> wrote:
    the.bee...@gmail.com schrieb am Donnerstag, 30. Juni 2022 um 17:02:35 UTC+2:
    On Tuesday, June 28, 2022 at 12:18:54 PM UTC+2, minf...@arcor.de wrote: >> >> > > That is more or less it is supposed to work.
    The error "kkk" is mentioned, and the Forth gives you some more
    information that could be useful.
    Gosh, yes. Addlebrained I am. :o(
    Sir, I have a complaint about your theater. Every time I enter a door labeled "EXIT"
    I end up outside. ;-)

    Even worse, I have been roaming in the 2nd floor. ;-)
    (ABORT" behind a long forgotten exception frame..)
    I have made ABORT" a loadable extension in ciforth.
    If you intend to use it, you better mean it.

    "This computer will self destruct in 10 seconds. 9, 8, 7, 6.."
    ;-)

    Hans Bezemer

    : program 1 abort" Let me out of here!" ;

    : run
    ['] program catch -2 of
    cr ." Sorry - ANS says no. Press a key." key drop recurse
    then ;

    Tested on gforth :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to none albert on Fri Jul 1 03:27:53 2022
    On Friday, July 1, 2022 at 8:14:04 AM UTC+2, none albert wrote:
    Even worse, I have been roaming in the 2nd floor. ;-)
    (ABORT" behind a long forgotten exception frame..)
    I have made ABORT" a loadable extension in ciforth.
    If you intend to use it, you better mean it.

    All fun on a sticky - in 4tH ABORT does just that: it quits, no questions asked.
    Which IMHO is logical - if you want to quit, quit. If you wanted to get CAUGHT, you would have THROWn an exception. So - if you use ABORT" in 4tH, it
    shows a message on stdout and goes bye-bye.

    If you THROW an exception without getting CAUGHT, it will show:
    "Uncaught exception". Recently, a new keyword was added to 4tH:
    THROW". This will show still a message, but can be CAUGHT. It is mostly
    used in libraries where returning an error code or setting a status is
    not easily feasible.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to dxforth on Fri Jul 1 06:48:33 2022
    dxforth schrieb am Freitag, 1. Juli 2022 um 11:46:19 UTC+2:
    On 1/07/2022 16:19, Hans Bezemer wrote:
    On Friday, July 1, 2022 at 8:14:04 AM UTC+2, none albert wrote:
    In article <f15c3df7-d0f6-4848...@googlegroups.com>,
    minf...@arcor.de <minf...@arcor.de> wrote:
    the.bee...@gmail.com schrieb am Donnerstag, 30. Juni 2022 um 17:02:35 UTC+2:
    On Tuesday, June 28, 2022 at 12:18:54 PM UTC+2, minf...@arcor.de wrote: >> >> > > That is more or less it is supposed to work.
    The error "kkk" is mentioned, and the Forth gives you some more
    information that could be useful.
    Gosh, yes. Addlebrained I am. :o(
    Sir, I have a complaint about your theater. Every time I enter a door labeled "EXIT"
    I end up outside. ;-)

    Even worse, I have been roaming in the 2nd floor. ;-)
    (ABORT" behind a long forgotten exception frame..)
    I have made ABORT" a loadable extension in ciforth.
    If you intend to use it, you better mean it.

    "This computer will self destruct in 10 seconds. 9, 8, 7, 6.."
    ;-)

    Hans Bezemer
    : program 1 abort" Let me out of here!" ;

    : run
    ['] program catch -2 of
    cr ." Sorry - ANS says no. Press a key." key drop recurse
    then ;

    Tested on gforth :)

    IMO acc. to standard 9.6.2.0680 & 9.6.1.2275 it should be as:

    : t1 abort" xxx" ;
    1 0 t1 .s 1 ok \ nothing happens
    drop
    0 1 t1 .s xxx ok \ show message, do CORE ABORT that resumes to QUIT

    : t2 ['] t1 catch ;
    1 0 t2 .s 1 0 ok \ nothing happens, flag 0 replace by exception code 0 2drop
    0 1 t2 .s 0 -2 ok \ don't show message, flag 1 replaced by exception code -2

    However it seems all unclear because different Forths seem to behave differently.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to minf...@arcor.de on Fri Jul 1 07:41:36 2022
    On Friday, July 1, 2022 at 3:48:35 PM UTC+2, minf...@arcor.de wrote:
    IMO acc. to standard 9.6.2.0680 & 9.6.1.2275 it should be as:

    : t1 abort" xxx" ;
    1 0 t1 .s 1 ok \ nothing happens
    drop
    0 1 t1 .s xxx ok \ show message, do CORE ABORT that resumes to QUIT

    : t2 ['] t1 catch ;
    1 0 t2 .s 1 0 ok \ nothing happens, flag 0 replace by exception code 0
    2drop
    0 1 t2 .s 0 -2 ok \ don't show message, flag 1 replaced by exception code -2

    However it seems all unclear because different Forths seem to behave differently.

    You're completely right - according to the standard, ABORT should be called. And
    according to the standard (Exception EXT) perform the function of -1 THROW.

    However - if one does *not* implement Exception Ext, the Core definition should be executed - which is: Empty the data stack and perform the function of QUIT, which includes emptying the return stack, without displaying a message.

    Again - according to Core - ABORT" should perform an implementation-defined abort sequence *that includes* the function of ABORT. However, according to Exception Ext, ABORT" should perform the function of -2 THROW.

    So the only thing I can imagine is that *some* implementations DO NOT implement Exception Ext or do not comply to it (for ABORT and ABORT").

    You can leave 4tH out of the equation though - the behavior of ABORT and ABORT" and their non compliance was intentional - for the reasons given above.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to minf...@arcor.de on Sat Jul 2 12:47:01 2022
    On 1/07/2022 23:48, minf...@arcor.de wrote:

    0 1 t2 .s 0 -2 ok \ don't show message, flag 1 replaced by exception code -2

    On that one I get:

    0 x -2

    where x is unknown. Which IMO is correct. The flag was consumed by ABORT"
    but CATCH is required to maintain the data stack level at the point it was invoked (excluding the xt).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Sat Jul 2 18:36:58 2022
    On 2/07/2022 00:41, Hans Bezemer wrote:
    On Friday, July 1, 2022 at 3:48:35 PM UTC+2, minf...@arcor.de wrote:
    IMO acc. to standard 9.6.2.0680 & 9.6.1.2275 it should be as:

    : t1 abort" xxx" ;
    1 0 t1 .s 1 ok \ nothing happens
    drop
    0 1 t1 .s xxx ok \ show message, do CORE ABORT that resumes to QUIT

    : t2 ['] t1 catch ;
    1 0 t2 .s 1 0 ok \ nothing happens, flag 0 replace by exception code 0
    2drop
    0 1 t2 .s 0 -2 ok \ don't show message, flag 1 replaced by exception code -2 >>
    However it seems all unclear because different Forths seem to behave differently.

    You're completely right - according to the standard, ABORT should be called. And
    according to the standard (Exception EXT) perform the function of -1 THROW.

    However - if one does *not* implement Exception Ext, the Core definition should
    be executed - which is: Empty the data stack and perform the function of QUIT,
    which includes emptying the return stack, without displaying a message.

    Again - according to Core - ABORT" should perform an implementation-defined abort sequence *that includes* the function of ABORT. However, according to Exception Ext, ABORT" should perform the function of -2 THROW.

    So the only thing I can imagine is that *some* implementations DO NOT implement
    Exception Ext or do not comply to it (for ABORT and ABORT").

    If the exception is re-thrown the result is the same as executing t1 directly.

    : t2 ['] t1 catch throw ;

    The code reported by CATCH conforms to the table in ANS. It's premature to
    say it won't perform ABORT aka -1 THROW if allowed to proceed. Am I missing something?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to the.beez.speaks@gmail.com on Sat Jul 2 20:06:36 2022
    In article <7dd80561-eab6-4d1b-b989-cb41b55819f9n@googlegroups.com>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On Friday, July 1, 2022 at 8:14:04 AM UTC+2, none albert wrote:
    Even worse, I have been roaming in the 2nd floor. ;-)
    (ABORT" behind a long forgotten exception frame..)
    I have made ABORT" a loadable extension in ciforth.
    If you intend to use it, you better mean it.

    All fun on a sticky - in 4tH ABORT does just that: it quits, no questions asked.
    Which IMHO is logical - if you want to quit, quit. If you wanted to get CAUGHT,
    you would have THROWn an exception. So - if you use ABORT" in 4tH, it
    shows a message on stdout and goes bye-bye.

    Same in ciforth. The standard *allows* to execute ABORT by -1 THROW ,
    but you and I agree that makes no sense.
    By the way you can't then you use ABORT as a factor of ABORT" because
    ABORT" must use -2 as the exception number!

    <SNIP>
    ABORT is an entry point for the system, in TURNKEY it is revectored
    to execute whatever the turnkey has to do.
    For the functionality both ABORT and QUIT are misnomers.


    Hans Bezemer


    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to the.beez.speaks@gmail.com on Sat Jul 2 20:10:55 2022
    In article <3f483a76-f41b-4f5f-a997-9de7a384da88n@googlegroups.com>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:

    You're completely right - according to the standard, ABORT should be called. And
    according to the standard (Exception EXT) perform the function of -1 THROW.

    Not true. If the implementor decides to implement ABORT via a THROW than
    -1 is obligatory. There is no requirement to use THROW though.
    So ciforth is standard in this respect.

    Hans Bezemer

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to none albert on Sat Jul 2 13:42:49 2022
    On Saturday, July 2, 2022 at 8:10:58 PM UTC+2, none albert wrote:
    In article <3f483a76-f41b-4f5f...@googlegroups.com>,
    Hans Bezemer <the.bee...@gmail.com> wrote:

    You're completely right - according to the standard, ABORT should be called. And
    according to the standard (Exception EXT) perform the function of -1 THROW. Not true. If the implementor decides to implement ABORT via a THROW than
    -1 is obligatory. There is no requirement to use THROW though.
    So ciforth is standard in this respect.
    There is a difference between the Core and Exception Ext definitions.
    In Core, ABORT" calls ABORT. In Exception Ext, ABORT does -1 THROW
    and ABORT" does -2 THROW. No need there to call ABORT here.

    HB


    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to the.bee...@gmail.com on Sat Jul 2 13:51:04 2022
    the.bee...@gmail.com schrieb am Samstag, 2. Juli 2022 um 22:42:51 UTC+2:
    On Saturday, July 2, 2022 at 8:10:58 PM UTC+2, none albert wrote:
    In article <3f483a76-f41b-4f5f...@googlegroups.com>,
    Hans Bezemer <the.bee...@gmail.com> wrote:

    You're completely right - according to the standard, ABORT should be called. And
    according to the standard (Exception EXT) perform the function of -1 THROW.
    Not true. If the implementor decides to implement ABORT via a THROW than
    -1 is obligatory. There is no requirement to use THROW though.
    So ciforth is standard in this respect.
    There is a difference between the Core and Exception Ext definitions.
    In Core, ABORT" calls ABORT. In Exception Ext, ABORT does -1 THROW
    and ABORT" does -2 THROW. No need there to call ABORT here.

    -1 THROW performs Core ABORT
    -2 THROW performs Core ABORT" that performs Core ABORT

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to albert on Sun Jul 3 14:16:18 2022
    On 3/07/2022 04:06, albert wrote:
    In article <7dd80561-eab6-4d1b-b989-cb41b55819f9n@googlegroups.com>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On Friday, July 1, 2022 at 8:14:04 AM UTC+2, none albert wrote:
    Even worse, I have been roaming in the 2nd floor. ;-)
    (ABORT" behind a long forgotten exception frame..)
    I have made ABORT" a loadable extension in ciforth.
    If you intend to use it, you better mean it.

    All fun on a sticky - in 4tH ABORT does just that: it quits, no questions asked.
    Which IMHO is logical - if you want to quit, quit. If you wanted to get CAUGHT,
    you would have THROWn an exception. So - if you use ABORT" in 4tH, it
    shows a message on stdout and goes bye-bye.

    Same in ciforth. The standard *allows* to execute ABORT by -1 THROW ,
    but you and I agree that makes no sense.
    By the way you can't then you use ABORT as a factor of ABORT" because
    ABORT" must use -2 as the exception number!

    <SNIP>
    ABORT is an entry point for the system, in TURNKEY it is revectored
    to execute whatever the turnkey has to do.
    For the functionality both ABORT and QUIT are misnomers.

    That was your choice (or perhaps more accurately Fig-Forth's :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to minf...@arcor.de on Sun Jul 3 01:26:13 2022
    On Saturday, July 2, 2022 at 10:51:05 PM UTC+2, minf...@arcor.de wrote:
    the.bee...@gmail.com schrieb am Samstag, 2. Juli 2022 um 22:42:51 UTC+2:
    On Saturday, July 2, 2022 at 8:10:58 PM UTC+2, none albert wrote:
    In article <3f483a76-f41b-4f5f...@googlegroups.com>,
    Hans Bezemer <the.bee...@gmail.com> wrote:

    You're completely right - according to the standard, ABORT should be called. And
    according to the standard (Exception EXT) perform the function of -1 THROW.
    Not true. If the implementor decides to implement ABORT via a THROW than -1 is obligatory. There is no requirement to use THROW though.
    So ciforth is standard in this respect.
    There is a difference between the Core and Exception Ext definitions.
    In Core, ABORT" calls ABORT. In Exception Ext, ABORT does -1 THROW
    and ABORT" does -2 THROW. No need there to call ABORT here.
    -1 THROW performs Core ABORT
    -2 THROW performs Core ABORT" that performs Core ABORT
    No - the standard explicitly states that when the THROW code is minus two, the core version of ABORT has to be performed.

    HB

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to dxforth on Sun Jul 3 03:03:20 2022
    On Friday, July 1, 2022 at 11:46:19 AM UTC+2, dxforth wrote:
    [..]
    : program 1 abort" Let me out of here!" ;

    : run
    ['] program catch -2 of
    cr ." Sorry - ANS says no. Press a key." key drop recurse
    then ;

    Tested on gforth :)

    No, you didn't.

    Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc.
    Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
    Type `bye' to exit
    : program 1 abort" Let me out of here!" ; ok
    : run compiled
    ['] program catch -2 of compiled
    cr ." Sorry - ANS says no. Press a key." key drop recurse compiled
    then ;
    :5: Invalid memory address
    then<<< ;
    Backtrace:

    Maybe you meant ... -2 = if ... ?

    run
    Sorry - ANS says no. Press a key.
    Sorry - ANS says no. Press a key.
    Sorry - ANS says no. Press a key.
    Sorry - ANS says no. Press a key.
    ...

    On iForth it still gives the extra CATCH information:

    FORTH> run
    **** RETURN STACK DUMP **** for MAIN-THREAD
    CATCH
    $01125FA8 (17981352)
    $01136000 (18046976)
    $01157000 (18182144)
    $01155C00 (18177024)
    $2CA5F7D0 (749074384)
    $00000000 (0)
    $00000003 (3)
    $00000003 (3)
    $2111FC00 (554826752)
    Sorry - ANS says no. Press a key.
    ...

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Marcel Hendrix on Sun Jul 3 20:39:11 2022
    On 3/07/2022 20:03, Marcel Hendrix wrote:
    On Friday, July 1, 2022 at 11:46:19 AM UTC+2, dxforth wrote:
    [..]
    : program 1 abort" Let me out of here!" ;

    : run
    ['] program catch -2 of
    cr ." Sorry - ANS says no. Press a key." key drop recurse
    then ;

    Tested on gforth :)

    No, you didn't.

    Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc.

    Gforth has progressed since 2008. It surprised me too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to dxforth on Sun Jul 3 03:57:19 2022
    On Sunday, July 3, 2022 at 6:16:20 AM UTC+2, dxforth wrote:
    Same in ciforth. The standard *allows* to execute ABORT by -1 THROW ,
    but you and I agree that makes no sense.
    We agree it makes no sense - however the "-1 THROW" is another wordset.
    Just like S" it enhances or overrides previous behavior. If you want to claim FULL COMPLIANCE to that particular wordset, I guess you'd have to include
    it. If not, you're still compliant - but only to the CORE wordset.

    As I interpret it, ABORT is a kind of "warm reboot" (since it leaves the dictionary intact). In 4tH that makes no sense, since there is no interactive Forth VM involved.

    ABORT is an entry point for the system, in TURNKEY it is revectored
    to execute whatever the turnkey has to do.
    For the functionality both ABORT and QUIT are misnomers.
    Agreed again - I think I'd called them RESTART or something. However - as
    far as they work out on 4tH, I'm quite happy with those names - since they actually abort or quit (indirectly). In 4tH, what they do is set the program counter
    past the last instruction - so it stops. Just like the original LEAVE. So, it's more
    like a jump to the end of the program.

    That was your choice (or perhaps more accurately Fig-Forth's :)
    When I remember correctly the Forth-79's on the Sinclair Spectrum had entry points for WARM and COLD restarts - so you might not be too far off. I'd have to delve into the old assembler sources to confirm this, however.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)