A potatoscript only requires that there be a beginning and end indicator in the file for it to be valid. Tildes are these indicators. For example, the following code can be executed with no errors:
~
Most commands in potatoscript do not have any specific syntax, but there are exceptions. One is the print start indicator (-), which requires an end indicator before the end of the script.
example potatoscripts
This potatoscript shows the message "Hello world!" and exits:
~-Hello world!_~
This prints "Hello", a newline, then "there":
~-Hello_/-there_~
This gets input from the user and prints it:
~-Input:_#-You typed_$~
indicators
"~" - start and end script
"-" - print start
"_" - print end
"/" - newline
"#" - get input and store it
"$" - print the stored string
"*" - reset the stored number
"+" - add one to the stored number
"`" - subtract one from the stored number
">" - multiply the stored number by the integer specified
"&" - divide the stored number by the integer specified
"^" - print the stored number
"@" - sleep for the integer after the indicator
"!" - force stop
"%" - alt version of the indicator
alt commands
+, -, >, and & (math indicators)
depending on how you use %, these indicators can do different things.
if % is behind an integer and is in front of a math indicator, the stored number is increased, decreased, multiplied, or divided by that integer, depending on which indicator you use.
if not, the stored number is increased, decreased, multiplied, or divided by 5.
NOTE: the integer to be used can only be 1 character long for the operation to work as expected.
_ (print end)
if % is in front of _, the string printed has no newline printed at the end.
# (get input)
if % is used, the input gathered from the user is stored as an integer.
if the input statement looks like the following: #%!, then the input will be appended to the stored string.
! (force stop)
if % is used, the integer after it is compared against the stored number. If they are equal, the program will stop.