This repository has been archived by the owner on Aug 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Documentation
Kick de Gans edited this page May 18, 2024
·
25 revisions
beryllium file.ber
puts("Hello world!"); /* Print without newline */
input("Enter your name:"); /* Returns the value the user inputted */
var file = open("file", options); /* Open file */
// options: R for reading basic text. RB for reading bytes. W for writing text. WB for writing bytes
file.read(); /* Read file */
file.write("content"); /* Write to file/stream */
var foo = value; /* Any type */
val foo = value; /* Any type */
global var foo = value; /* Any type */
fun foo() { /* No arguments*/
...
}
fun foo(bar) { /* Arguments */
...
}
if (condition) { /* If statement */
...
}
else if (condition) {
...
}
else {
...
}
while (condition) {
...
}
for (var i = 0; i < 5; i = i + 1) {
...
}
foreach (x in source) {
...
}