Printscript is an esoteric programming language. It is inspired by Lua. This programming language supports the "print" function and many others.
The syntax of the print function is:
print "some string"
Only ONE space should be put behind the "print" so that it will print as the programmer would expect.
Small secret: any character can substitute space, like
Note that Printscript supports multi-line strings like:
print "Line 1 Line 2 Line 3"
The output is:
Line 1 Line 2 Line 3
Multiple “print”'s are supported:
print "aaa "print "bbb "print "ccc"
aaa bbb ccc
If no spaces are added behind the "print", the output would skip the first character and print the rest of the characters if the string is not less than 2 characters.
A new characteristic is added in Version 2. It can print various unsupported characters using \. Example. print "print"
Example. Print a "
Version 4 adds variable support.
Variables can only be one-char. However, it can be any char in the ASCII code.
Set: command used for setting a variable into a value
Example for setting a variable to char 3
set / 3 print /
Sev: command used for setting a variable into a variable.
set @ 2 print @ print " " sev % @ print %
Hello, world! program
print "Hello, world!"
This prints spaces until there is no enough space.
The programs above prints spaces until there is no more space for code.
How it works: The interpreter scans for the matching " while printing everything.
Version 3 fixes this problem. An error will print if the string is not matched.
Usage: ps your_program.ps
These programs are tested on Tiny C Compiler, but these not yet tested on other compilers.
Version 5 and later. Created because I forgot that I can use the pastebin.