Talk About Network



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: & in A rati...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 7 Topic 4047 of 4053
Post > Topic >>

Re: & in A rationale for ARRAYs in the Forth Scientific Library

by Bruce McFarling <agila61@[EMAIL PROTECTED] > May 11, 2008 at 11:07 AM

On May 11, 8:07 am, Josh Grams <j...@[EMAIL PROTECTED]
> wrote:

> My position is somewhere between those two extremes, and is distinct
> from both.  I hold that you can have somewhat abstract stack effects
> without unduly restricting implementation techniques.  The ANS standard
> does this with control-flow words, for instance.

However, its not the stack effects that are abstracted in the FSL
utilities, but the structure of the entities that the stack items
refer to.

If you want to have:

array{} ( index -- array{index} )

it is unambiguous that its:

: array{} ( index -- array{index} ) array{ SWAP } ;

What's at issue in the question of whether it can be assumed that all
FSL arrays are structured like the arrays defined in the fsl-util
files is how to write new words like ``}''.

I've noted my position on this before at length ... there should be a
compiler constant that says whether or not that can be assumed.

If the compiler constant is present and TRUE, then it can be assumed
that the arrays are structured like the fsl-util file arrays, and the
carnal knowledge of that structure can be used when writing new
``}foo'' words ... if there is no compiler constant, or if it is
false, it cannot be assumed, then new ``}foo'' words must be written
in terms of existing words that operate on ( array ) and ( element )
items on the stack.




 7 Posts in Topic:
& in A rationale for ARRAYs in the Forth Scientific Library
Michael <michael.kalus  2008-05-09 11:57:42 
Re: & in A rationale for ARRAYs in the Forth Scientific Library
"C. G. Montgomery&qu  2008-05-09 19:51:18 
Re: & in A rationale for ARRAYs in the Forth Scientific Library
Josh Grams <josh@[EMAI  2008-05-10 11:14:54 
Re: & in A rationale for ARRAYs in the Forth Scientific Library
"C. G. Montgomery&qu  2008-05-10 13:11:25 
Re: & in A rationale for ARRAYs in the Forth Scientific Library
Josh Grams <josh@[EMAI  2008-05-11 12:07:22 
Re: & in A rationale for ARRAYs in the Forth Scientific Library
Michael <michael.kalus  2008-05-11 00:48:42 
Re: & in A rationale for ARRAYs in the Forth Scientific Library
Bruce McFarling <agila  2008-05-11 11:07:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri May 16 2:43:03 CDT 2008.