|
|
Up |
|
|
  |
Author: douglasrdouglasr Date: Dec 17, 2007 03:00
> Coos Haak writes:
>>Op Sun, 16 Dec 2007 17:44:17 GMT schreef Anton Ertl:
>
>>> douglasr dunvegan.co.uk> writes:
>>>>Is there any way to create a nameless word simply for the purpose of
>>>>being able to assign it's action to QUANTITY?
>
>>> In standard Forth the only way to create a nameless word is :NONAME.
>>> There is no standard way to create a nameless word with CREATE, but
>>> you can create a nameless colon definition with :NONAME that performs
>>> the same action as a word created with CREATE (...DOES>). However,
>>> wrt space efficiency the :NONAME-created word is probably worse on
>>> most systems than a CREATE-DOES>-created word with a throwaway name.
>
>>Surely, I agree with your explanation to use :NONAME for the problem at
>>hand, but could you explain, why is a word that only has some entering code
>>(a la DOCOL) followed by some code and no name longer than a word with a
>>header and some code?
> ...
|
| Show full article (11.31Kb) |
|
| | 7 Comments |
|
  |
Author: douglasrdouglasr Date: Dec 17, 2007 03:18
On 17 Dec, 11:00, douglasr dunvegan.co.uk> wrote:
>> Coos Haak writes:
>>>Op Sun, 16 Dec 2007 17:44:17 GMT schreef Anton Ertl:
>
>>>> douglasr dunvegan.co.uk> writes:
>>>>>Is there any way to create a nameless word simply for the purpose of
>>>>>being able to assign it's action to QUANTITY?
>
>>>> In standard Forth the only way to create a nameless word is :NONAME.
>>>> There is no standard way to create a nameless word with CREATE, but
>>>> you can create a nameless colon definition with :NONAME that performs
>>>> the same action as a word created with CREATE (...DOES>). However,
>>>> wrt space efficiency the :NONAME-created word is probably worse on
>>>> most systems than a CREATE-DOES>-created word with a throwaway name. ...
|
| Show full article (11.75Kb) |
|
| | no comments |
|
  |
Author: douglasrdouglasr Date: Dec 17, 2007 05:43
On 17 Dec, 11:18, douglasr dunvegan.co.uk> wrote:
> On 17 Dec, 11:00, douglasr dunvegan.co.uk> wrote:
>
>
>
>
>>> Coos Haak writes:
>>>>Op Sun, 16 Dec 2007 17:44:17 GMT schreef Anton Ertl:
>
>>>>> douglasr dunvegan.co.uk> writes:
>>>>>>Is there any way to create a nameless word simply for the purpose of
>>>>>>being able to assign it's action to QUANTITY?
>
>>>>> In standard Forth the only way to create a nameless word is :NONAME.
>>>>> There is no standard way to create a nameless word with CREATE, but
>>>>> you can create a nameless colon definition with :NONAME that performs
>>>>> the same action as a word created with CREATE (...DOES>). However,
>>>>> wrt space efficiency the :NONAME-created word is probably worse on
>>>>> most systems than a CREATE-DOES>-created word with a throwaway name. ...
|
| Show full article (13.49Kb) |
| no comments |
|
  |
Author: douglasrdouglasr Date: Dec 19, 2007 05:53
Thanks Anton,
Please accept my apologies!
I now have a better understanding of posting procedures
which I shall do my best to conform to ...
> [Re: separate wordlist ...]
> You could use the same approach to make sure your X or Z does not
> shadow anything else.
|
| Show full article (1.10Kb) |
| no comments |
|
  |
Author: Josh GramsJosh Grams Date: Dec 19, 2007 15:18
On Dec 19, 8:53 am, douglasr dunvegan.co.uk>wrote:
>>Note that execute-parsing.fs defines X only in a separate wordlist
>>and that is only used in a way that should not cause any shadowing
>>between this X and any user-defined X, so you should be able to use
>>X just as well as Z.
>
>I am not clear how you have hidden X from other than execute-parsing.
>Since the definition of X is sandwiched between the get-current ...
>set-current, I am wondering how execute-parsing can find it?
X is defined in execute-parsing-wordlist.
execute-parsing uses >order to add execute-parsing-wordlist to the
top
of the search order so that EVALUATE will find this X.
X begins by using PREVIOUS to remove execute-parsing-wordlist from the
search order.
Now something *I'm* not clear about. You posted this example earlier:
|
| Show full article (2.02Kb) |
| no comments |
|
  |
Author: douglasrdouglasr Date: Dec 20, 2007 05:51
On 19 Dec, 23:18, Josh Grams qualdan.com> wrote:
> X is defined in execute-parsing-wordlist.
> ...
> execute-parsing uses >order to add execute-parsing-wordlist to the
> top of the search order so that EVALUATE will find this X.
Thanks for that explanation.
> Now something *I'm* not clear about. You posted this example earlier:
>
>>> This approach facilitates use of the data - for example a simple
>>> inventory report would be:
>>> BEGIN
>>> QUANTITY...
|
| Show full article (8.24Kb) |
| no comments |
|
  |
Author: Alex McDonaldAlex McDonald Date: Dec 20, 2007 05:59
On Dec 20, 1:51 pm, douglasr dunvegan.co.uk> wrote:
> On 19 Dec, 23:18, Josh Grams qualdan.com> wrote:
>
>
> On retrieving the data via ODBC functions into the Forth programme
> I observe the following:
>
> BinaryColumn DUMP
> 1C988A 54 00 65 00 78 00 74 00 20 00 69 00 6E 00 20 00
> T.e.x.t. .i.n. .
> 1C989A 42 00 69 00 6E 00 61 00 72 00 79 00 43 00 6F 00
> B.i.n.a.r.y.C.o.
> 1C98AA 6C 00 75 00 6D 00 6E 00 20 00 66 00 69 00 65 00
> l.u.m.n. .f.i.e.
> 1C98BA 6C 00 64 00 2E 00 00 00 00 00 00 00 00 00 00 00
> l.d.............
>
> So, every second character is a 00
|
| Show full article (0.89Kb) |
| no comments |
|
  |
|
|
  |
Author: douglasrdouglasr Date: Dec 20, 2007 07:16
On 20 Dec, 13:59, Alex McDonald rivadpm.com> wrote:
> On Dec 20, 1:51 pm, douglasr dunvegan.co.uk> wrote:
>
>> On retrieving the data via ODBC functions into the Forth programme
>> I observe the following:
>
>> BinaryColumn DUMP
>> 1C988A 54 00 65 00 78 00 74 00 20 00 69 00 6E 00 20 00
>> T.e.x.t. .i.n. .
>>
>> So, every second character is a 00
>
> It's actually Unicode. There are Windows functions MultiByteToWideChar
> and WideCharToMultiByte that can translate between ASCII and Unicode;
> ther may even be some flag that you can set hen talking to ODBC that
> does the translation for you (I've not checked).
>
> --
> Regards
> Alex McDonald- Hide quoted text - ...
|
| Show full article (2.49Kb) |
| no comments |
|
|