![]() | ||
| Home | SwiftX Archive | SwiftForth Archive | |

>>I though this was only for a task with transitient behavior.
>
>Well, yes, you asked how a task could stop itself. That's how.
>If what you want is for the task to stop flashing until your other
>button is pressed, you can do that with a single task, where if
>the "stop" button is pressed you go into a loop executing
>PAUSE (and not flashing) and waiting for the "start" button to be pressed
>again whereupon you start flashing again. While flashing you'd need
>to repeatedly check for the "stop" button to be pressed. The task
>isn't ever actually STOPping, it's in one of two loops (e.g. BEGIN...UNTIL)
>either flashing while checking for a "stop" button or not flashing while
>checking for a "start" button.
This is the nice technique I was looking for. Pity I didn't
find it myself, but for sure I was not far
from discovering it - as I began to understand
one must actually get used to using several little tasks
just like one uses many short words.
>> IF TESTER HALT
>> ELSE PIND C@ 253 =
>> IF TESTER ACTIVATE
>
>I promise you, if you ever execute this phrase your
>task will crash, because it will fall through to the
>semicolon at the end of the definition.
But I executed many times.
Actually I discovered while interactively testing
a task that was loaded into the target that
typing in the console TASK HALT and TASK ACTIVATE and Enter
the program did exactly what I wanted.
Anyhow, I'll review the code.
Thanks for the nice technique,
Viviane Beullens
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Mon Aug 11 2003 - 02:26:03 PDT
This archive was generated by hypermail 2.2.0 : Fri Dec 05 2008 - 03:04:22 PST