From: "Elizabeth D. Rather" <erat...@forth.com>
Date: Mon, 12 Nov 2012 07:57:19 -1000
Local: Mon, Nov 12 2012 12:57 pm
Subject: Re: Words consuming arguments, was [Re: Is there a better way?]
On 11/11/12 11:48 PM, Andrew Haley wrote:
> Rod Pemberton <do_not_h...@notemailnotz.cnm> wrote:You are right, I wrote that late at night and in haste.
>> "Hugh Aguilar" <hughaguila...@yahoo.com> wrote in message
>>> On Nov 6, 6:53 pm, "Rod Pemberton" <do_not_h...@notemailnotz.cnm>
>>>> What about a word like COUNT ?
>>>> COUNT ( addr -- addr len )
>>> This is the stack picture for COUNT :
>>> : count ( adr1 -- adr2 len )
>>> COUNT does consume adr1 --- and then it gives you back
>> That's a matter of interpretation. len is definately different.
>>> (adr2 is not the same datum as adr1).
>> False. "adr2 is" _typically_ "not the same datum as adr1", but can be.
>> There is no requirement that adr2 be different from adr1.
> Of course there is, because the count is at c-addr1, and c-addr2 is
> 6.1.0980 COUNT
> ( c-addr1 -- c-addr2 u )
> Return the character string specification for the counted string
>> There is only a requirement that COUNT returns an address to the
> The count precedes the string, as COUNT's glossary entry makes clear.
"Forth-based products and Services for real-time
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.