Re: aus and chars (was: CMOVE wrong?)



Albert van der Horst <albert@xxxxxxxxxxxxxxxxxx> writes:
In article <2007Mar4.225908@xxxxxxxxxxxxxxxxxxxxxxxxxx>,
Anton Ertl <anton@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
[someone wrote:]
There is a weaker version of 1 CHARS = 1 that I thought of.
Admit that characters visible to the users are 1 CHARS.

What's that supposed to mean?

A character visible to the user is what is printed or read.
This need not be the characters internally in a Forth.

I fail to see how this all is supposed to fit together.

I have the first problem with the "admit" sentence. In Forth-94 the
printable characters have the values 32-126, and they do fit into 1
CHARS of memory. So what is this "admit" supposed to mean? And what
are "characters internally in a Forth"?

Now for the complication you desire: If you want to deal with bytes,
you have a byte-addressed machine. On such a machine, 1 au = 1 byte,
so no need to worry about an additional level.

There are hardly any words that deal with au in Forth.

Given 1 CHARS = 1, which was the start of this subthread, you have C@,
C!, etc. for dealing with aus.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2007: http://www.complang.tuwien.ac.at/anton/euroforth2007/
.



Relevant Pages

  • Re: RfD: c-addr/len
    ... length in primitive characters. ... standard programs that don't have an environmental dependency on ... CHARS = 1, and all maintained systems support these programs, so ... M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html ...
    (comp.lang.forth)
  • Re: RfD: Signed and Unsigned Word Fetch and Store
    ... Anton Ertl wrote: ... in Forth can be seen as an integer type), the main job of chars in C ... precedent for W@ and L@, either, because C@ is for characters and W@ ...
    (comp.lang.forth)
  • Re: aus and chars (was: CMOVE wrong?)
    ... Anton Ertl wrote: ... Admit that characters visible to the users are 1 CHARS. ... you have a byte-addressed machine. ...
    (comp.lang.forth)
  • Re: unix filename restriction
    ... underscore _ and the dot. ... You could use other characters, ... never met a *human* defined path of more than 80 chars (most of the ... If you want to be very sure, limit your filename to the DOS limit of 8 ...
    (comp.os.linux.development.apps)
  • Re: Predefined Cell Character Length
    ... =LEFTreturns up to 10 characters. ... If 3 chars in a cell just those 3 will be returned. ... Gord Dibben MS Excel MVP ... cells in clumn A can only be 10 characters at the most, ...
    (microsoft.public.excel.worksheet.functions)