TopNote is an esolang invented by User:Pifrited.
Commands
Command |
Meaning
|
num |
42 (Can be omitted)
|
list |
[1,2,3...]
|
code |
{code}
|
string str "asdf" |
"asdf"
|
define |
define variable A equal to “test”
|
cover |
cover object with element
|
function |
Function func(input1,input2...){code}
|
run |
run {code}
|
if |
if condition is true, run {True}, or else run {False}
|
repeat |
repeat {code} until break
|
break |
stop the loop
|
jump |
restart the loop
|
Defined functions
Type conversion
Function |
Result
|
ToString ToStr |
translate num into string
|
ToNum |
translate “str” into number
|
List
Function |
Result
|
join |
join origin and element (Return type is equal to origin.)
|
getElement |
get indexth element of object
|
Math
Function |
Result
|
sum |
sum all the input
|
minus |
return num1 - num2
|
mult |
return product of the inputs
|
div |
return num1 / num2
|
mod |
return num1 % num2
|
power |
return num1 ^ num2
|
root |
return num1th root of num2
|
Logic
Function |
Result
|
equal |
return true if the inputs are same
|
lt |
return true if num1 < num2
|
gt |
return true if num1 > num2
|
Input/Output
Function |
Result
|
print |
print the input on command window
|
input |
get input (default from the command window)
|
output |
give output (default to the command window)
|
Examples
Print “Hello, world!”:
print
FizzBuzz:
define repeat