Special variables: Difference between revisions

Added Quackery.
m (Regularize non-standard header markup)
(Added Quackery.)
Line 1,621:
round set setattr slice sorted staticmethod str sum
super tuple type vars zip</pre>
 
=={{header|Quackery}}==
 
The trite answer would be that Quackery has no variables.
 
It does, however, have Ancillary Stacks which stand in for variables, in that they are places where values can reside. Their behaviour is to place a pointer to themselves on the stack (''the stack'' refers to the Quackery Data Stack, the place from which words take arguments and return results), so that they can have values moved to and from them.
 
Ancillary Stacks might also, arguably, be considered slightly outside the language proper. To use a metaphor, if Quackery is a workshop, and Quackery words are tools for working on data, then the stack is the workbench that data resides on while it is being worked upon, and Ancillary Stacks are the storage spaces where one can put things to keep the workbench tidy. If asked to list the tools in a workshop, would you necessarily list shelves and cupboards as tools?
 
If predefined system constants are to be included, (i.e. words that take no arguments and always return the same value, a category which includes Ancillary Stacks) then there are several, including but not limited to <code>space</code> which returns 32, <code>carriage</code> which returns 13 (and is taken to mean whatever the host system regards as a carriage return/line feed), <code>[]</code>, which returns the empty nest <code>[ ]</code>, <code>true</code> which returns 1 and <code>false</code> which returns 0.
 
However, I suspect the most useful answer is "those things which need to be taken into consideration whilst coding in Quackery, because they give words side-effects rather than the words being purely functional in their behaviour."
 
With this definition there is only one word that requires mention; <code>base</code>. <code>base</code> is a system ancillary stack that holds the current base for numerical i/o and converting numerical strings to and from numbers and so forth. It has a default value of 10 — i.e. Quackery regards numbers as decimal unless that assumption is overridden by putting a different value on the top of the ancillary stack called <code>base</code>.
 
=={{header|Racket}}==
1,462

edits