Printscript 13

From Esolang
Jump to navigation Jump to search

Printscript 13 is invented by User:A.

There is a problem in loops(it seems to terminate early).

Version 13 modifies the arithematic functions to make it support variable modifying.

The original functions are modified as variable modifying:

set a !
set b !
add a b
pint a

Output:

66

New functions:

inv dev muv dvv mov

These are the original functions.

Version 14 fixes sev, and adds four functions: max, min, abs, and neg.

-example
set a 1
set b 2
max a b-set a to the maximum value of a and b
print a-> 2
set b 1
min a b-set a to the minmum value of a and b
print a->1
set a 1
set b 2
dec a b
pint a->-1
abs a->1 Set a to the absolute value of a
neg a-Let a be a*-1
pint a->-1

Version 15 adds comparison functions: ==v ~=v >v <v >=v <=v

Currently they can only operate with values.

==v Check if the variables are equal.
~=v Check if the variables are not equal. >=v Check if the former variable is greater than or equal to the latter variable.

And etc...

Version 16 adds the case statement.

input a
case a- use a to compare equality
	if 1-if a is equal to '1'
		print "This is 1"
	end
	if 2-if a is equal to '2'
		print "This is 2"
	end
done

Implementation

Version 13 Version 14 Version 15 Version 16

See Also