RosettaCodeData/Task/Empty-string/Quackery/empty-string.quackery

20 lines
701 B
Plaintext

Welcome to Quackery.
Enter "leave" to leave the shell.
/O> $ "" temp put ( move an empty string to temp )
... temp share ( copy the empty string on temp to the stack )
... $ '' = ( compare the top of stack to an empty string, and replace it with
... 1 (true) if it is an empty string and 0 (false) if it is not. )
... temp take ( move the empty string on temp to the stack )
... $ '' != ( compare the top of stack to an empty string, and replace it with
... 1 (true) if it is not an empty string and 0 (false) if it is. )
...
Stack: 1 0
/O> leave
...
Aloha.