Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: Miser's CAS...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 17 Topic 3814 of 4287
Post > Topic >>

Re: Miser's CASE

by m_l_g3@[EMAIL PROTECTED] Mar 12, 2008 at 11:14 AM

1) The words CASE and ENDCASE are already taken: please find other
names. CASE is not necessarily an immediate 0.

2) Do you have an implementation that uses tables? You could.  You
could switch to interpretation state between COND and WHEN.

3) You cannot rely on the size of orig and dest being 1 or 2 cells:
$ gforth
Gforth 0.6.2, Copyright (C) 1995-2003 Free Software Foundation, Inc.

0 value orig-size  ok
: foo [ depth to orig-size ] if [ depth orig-size - to orig-size ]
then ;  ok
orig-size . 3  ok
0 value dest-size  ok
: bar [ depth to dest-size ] begin [ depth dest-size - to dest-size ]
until ;  ok
dest-size . 3  ok

In fact, it, at least in theory, may be 0 cells  on the data stack
(and N cells on some other stack).
 




 17 Posts in Topic:
Miser's CASE
"Ed" <nospam  2008-03-08 17:44:31 
Re: Miser's CASE
m_l_g3@[EMAIL PROTECTED]   2008-03-12 11:14:44 
Re: Miser's CASE
"Ed" <nospam  2008-03-14 12:43:47 
Re: Miser's CASE
"Ed" <nospam  2008-03-18 10:51:51 
Re: Miser's CASE
Coos Haak <chforth@[EM  2008-03-18 01:06:41 
Re: Miser's CASE
"Mark W. Humphries&q  2008-03-13 19:41:47 
Re: Miser's CASE
"Ed" <nospam  2008-03-15 11:21:21 
Re: Miser's CASE
Alex McDonald <blog@[E  2008-03-15 05:33:52 
Re: Miser's CASE
"Ed" <nospam  2008-03-16 16:15:33 
Re: Miser's CASE
"Mark W. Humphries&q  2008-03-15 09:45:59 
Re: Miser's CASE
John Doty <jpd@[EMAIL   2008-03-15 10:52:05 
Re: Miser's CASE
Bruce McFarling <agila  2008-03-15 13:33:37 
Re: Miser's CASE
Bruce McFarling <agila  2008-03-15 22:56:19 
Re: Miser's CASE
"Ed" <nospam  2008-03-16 18:48:04 
Re: Miser's CASE
Bruce McFarling <agila  2008-03-16 13:00:29 
Re: Miser's CASE
"Ed" <nospam  2008-03-18 12:33:40 
Re: Miser's CASE
Bruce McFarling <agila  2008-03-18 09:05:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 23:32:22 CDT 2008.