25 lines
401 B
Plaintext
25 lines
401 B
Plaintext
use foo;
|
|
// comment
|
|
main() {
|
|
uint y = 1;
|
|
uint8 x = 0;
|
|
if x > 0 {
|
|
print("Hello World, x is zero");
|
|
} else {
|
|
print("Hello World, x is %", x);
|
|
}
|
|
|
|
while x < 10 {
|
|
x++;
|
|
}
|
|
print("x is % now", x);
|
|
|
|
string file_path = "../examples/print.sr";
|
|
fs.read(file_path);
|
|
|
|
|
|
uint8[] x = [1,2,3];
|
|
x.push(4);
|
|
x.push(1);
|
|
x.push(2);
|
|
} |