Skip to content

Runtime Functions

Luís Carlos Moreira edited this page Mar 2, 2018 · 4 revisions

Runtime Functions

echo(Any) --> Any
Print any element´s in new line.

echo("Oro Language") # Oro Language

put(Any) -> Any
Print any element´s in line.

put("Hello Oro Language") # Hello Oro Language

puts(Any) -> Any
Print any element´s in new line.

puts("Hello World") # Hello World

write(Any) -> Any
Print any element´s in line.

write("Hello World") # Hello World

writeln(Any) -> Any
Print any element´s in new line.

writeln("Hello World") # Hello World

print(Any) -> Any
Print any element´s in line.

print("Hello World") # Hello World

println(Any) -> Any
Print any element´s in new line.

println("Hello World") # Hello World

prompt(Any) -> Any
Read input from console line.

prompt("Enter the password: ")

quit()
Exit to REPL.

quit()

typeof(Any) -> Any
Return of type Any.

typeof(1) # Integer

len(Any) -> Integer
Return count of Any.

len("abcde") # 5 

first(Any) -> Any
Return the one element of the array.

first([123,4,5,6,7]) # 123

last(Any) -> Any
Return the last element of the array.

last([123,4,5,6,7]) # 7

rest(Any) -> Any
Returns the second element in front of the array.

rest([123,4,5,6,7]) # [4, 5, 6, 7]

push(Any) -> Any
Adds the element to the end of the array.

push([123,4,5,6,7], 99) # [123, 4, 5, 6, 7, 99]

push(Any) -> Any
Adds the element to the end of the array.

push([123,4,5,6,7], 99) # [123, 4, 5, 6, 7, 99]

String(Any), Integer(Any), Float(Any) and Array(Any)
Returns any type.

String(1) # 1
Integer(12.2) # 12
Float("12.29") # 12.290000
Array("1, 2, 3") # [1, 2, 3]

Functions Environment(), NameVersionEnvironment(), Name(), Version(), NameVersion(), AuthorName(), AuthorEmail() and Copyright()
Return string´s of the environment of the Oro Language.

Name() # Oro Programming Language
AuthorName() # LuisCM

Functions used in the standard library and runtime internally.

panic(), runtime_rand(), runtime_tolower(), runtime_toupper(), runtime_regex_match()

Clone this wiki locally