Mike Ghan wrote:
> Just as in the startup code:
>
> : CLR-STK S0 @ SP! ;
>
> Mike
>
So, the answer is, just use CLR-STK. It's unclear what Joel's context
is. It's obviously necessary for the system to do this on occasion
(initialization, error recovery, etc.), and potentially a command-line
convenience, but as Rick points out, it can cause trouble if used in
code. In general, it's a bad idea to write code that depends on some
particular stack condition, because that makes a context-dependency that
severely limits the utility of words.
Cheers,
Elizabeth
> -----Original Message-----
> From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf
> Of Joel Reymont
> Sent: Monday, January 12, 2009 9:11 AM
> To: sftalk_at_forth.com
> Subject: [sftalk] clearing the stack
>
> I feel silly asking this but... how do you clear the stack?
>
> gforth has clearstack.
>
> Thanks, Joel
>
> ---
> http://twitter.com/wagerlabs
>
>
>
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and
> bug reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and
> bug reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>
-- ================================================== Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc. +1 310.999.6784 5959 West Century Blvd. Suite 700 Los Angeles, CA 90045 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." ================================================== ---------------------------------------------------------------------- sftalk_at_forth.com The SwiftForth programming discussion email list To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com For list command help, send subject "help" to sftalk-request_at_forth.com Message archives are located at http://www.forth.com/archive/sftalk ---------------------------------------------------------------------- This list is a forum for SwiftForth users. For product support and bug reports, please send email to support_at_forth.com ----------------------------------------------------------------------Received on Tue Jan 13 2009 - 23:58:02 PST
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 09-Feb-2012. Archive updated nightly.