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


PICK$ Search:

In Transient String Words in String Library

Word Name: PICK$
Type: Standard word
Data Stack Signature: n -- / ss: -- s(n)
Return Stack Signature: --
Availability: V1.2
Description:

Places a copy of string n to the top of the string stack. Allows the string stack to be indexed as an array.

Example:

$" red" 0 pick$ $.s \ dumps the string stack. The top two strings are red red

Comment:

An error occurs if n lies outside the range of depth$.

0 PICK$ is equivalent to DUP$. 1 PICK$ is equivalent to OVER$.

See Also: PICK  DEPTH$ 

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