<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


CLEN$ Search:

In String Constant Words in String Library

Word Name: CLEN$
Type: Standard word
Data Stack Signature: $Caddr -- length
Return Stack Signature: --
Availability: V1.2
Description:

Returns the actual length of the string stored within the string constant.

Example:

50 $CONST GREETING \ declare string constant called GREETING, max length 50 chars
GREETING :=" Hello, World!" \ store a string inside the string constant
GREETING CLEN$ . \ obtain and display length of the string

Comment:

To get the maximum string space allocated to the string constant, see MAXLEN$.

See Also: $CONST  :=''  MAXLEN$  LEN$ 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>