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


SWAP$ Search:

In Transient String Words in String Library

Word Name: SWAP$
Type: Standard word
Data Stack Signature: -- / ss: s1 s2 -- s2 s1
Return Stack Signature: --
Availability: V1.2
Description:

Swaps the topmost two strings on the string stack.

Example:

$" red" $" blue" SWAP$ $.s \ place red and blue on the string stack (blue on top) and swap them, then display the string stack.

Comment:

A run-time error occurs if there are less than two strings on the string stack.

See Also: None listed

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