Enrtopy++
Creator and Name
Enrtopy++ is an esoteric language created by the User:Esolang1. This language is a successor to Enrtopy, which was designed to be Entropy without changing data. (E1-0003)
Syntax
Syntax is equal to Entropy, but the only difference is that the semicolon is not required. Also a do loop that simply repeats instructions a set times and a get function is added.
Datatypes
Int Integer datatype. ==, !=, >, <, >=, <= are available comparisons. Float Real number datatype. Same comparisons are available. Str Array of characters. List Array of any one of the 4 datatypes.
Variables
In order to use a variable, the variable must be declared.
declare <NAME> <TYPE>
After declaring the variable, it can be used.
let <NAME> = <VALUE> let <NAME> = <EQUATION>
For lists, the expression will be the following.
let <NAME> = [element, element, ...]
To access an element at an index,
<NAME>[IDX]
Enrtopy++ is 0-indexed.
I/O
The print instruction can be used like this:
print <NAME> print <STRING>
To get user input and store it to a variable, use get:
get <NAME>
Examples
Hello, World!
Program MyNamespace MyProgram [
print "Hello, World"
]
Cat
Program MyNameSpace MyProgram [
declare s str
get s
print s
]
Because there are no random changes in variable values, this program will always print out Hello, World.
99 Bottles of Beer
Program Rottytooth NinetyNineBottles [
declare count real
let count = 99
while count > 0
[
if count < 99
[
print count
print " bottles of beer on the wall.\n"
]
print count
print " bottles of beer on the wall, "
print count
print " bottles of beer.\nTake one down, pass it around, "
let count = count - 1
]
print " no more bottles of beer on the wall."
]