6.1.0850 C! c-store CORE

( char c-addr -- )

Store char at c-addr. When character size is smaller than cell size, only the number of low-order bits corresponding to character size are transferred.

See:

Testing:

ContributeContributions

ruvavatar of ruv [342] Data type of a parameters in `c!`Request for clarification2024-06-11 15:56:58

Is the following fragment standard compliant?

-1 pad c!

The glossary entry for c! says:

( char c-addr -- )
When character size is smaller than cell size, only the number of low-order bits corresponding to character size are transferred.

It seems, the text description implies a stack diagram ( x c-addr -- ) or ( char|x c-addr -- ).

AntonErtlavatar of AntonErtl

Good catch. Yes, ( x c-addr -- ) looks more appropriate. For comparison, that is already the case for emit. Do we have any other words that consume a char as input?

Reply New Version