Wiki
Clone wikiAlchemy / Input / Output
Input / Output
In Alchemy, I/O relies upon four special built-in Elements, and the different functionality they provide. They are defined as "product only", so that they may only appear as products as reactions. If they occur as a reagent, the EXPL_IRRATIONAL_REAGENT explosion occurs. The I/O Elements are as follows:
Input
- Quantifius: Fetch a line from stdin and interpret it as the string representation of a double, eg. "6.281" becomes 6.281.
- Inquirium: Fetch a single character from stdin and use its ASCII value, eg. 'A' becomes 65.
Output
- Elucidium: Write the value to stdout as a string representation of the double, then a newline, eg. 6.281 is written as "6.281\n".
- Scribius: Write a character to stdout whose ASCII value corresponds to the Element's value, eg. 65 is written as 'A'.
Updated