<-- Home
Manage -->

C!

In Memory Access in Certified Forth Words

Word Name: C!
Type: Standard word
Data Stack Signature: char c-addr --
Return Stack Signature: --
Availability: 200x  ANS94  Forth-83  FIG
Forth 200x Reference: 6.1.0850
ANS94 Reference:
Description:

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.

Standard Reference URL: http://
Example:

None

Comment:

None

See Also: ! 
Test Code:

HERE 1 C,
HERE 2 C,
CONSTANT 2NDC
CONSTANT 1STC

T{    1STC 2NDC U< -> <TRUE> }T \ HERE MUST GROW WITH ALLOT
T{      1STC CHAR+ ->  2NDC  }T \ ... BY ONE CHAR
T{  1STC 1 CHARS + ->  2NDC  }T
T{ 1STC C@ 2NDC C@ ->   1 2  }T
T{       3 1STC C! ->        }T
T{ 1STC C@ 2NDC C@ ->   3 2  }T
T{       4 2NDC C! ->        }T
T{ 1STC C@ 2NDC C@ ->   3 4  }T