Portable standard facades for byte text, environment, timers, randomness, mapped files, streams, worker pools, directory trees and threads; full ASCII lowercase in std/unicode; examples move to examples/ with generated site pages; Go output handles mixed-width slice bounds.
22 lines
475 B
Ziran
22 lines
475 B
Ziran
// Variables and constants: a declared type, an inferred type, a default
|
|
// zero value, and a compile-time constant.
|
|
LIMIT :: 100;
|
|
|
|
main :: () {
|
|
greeting: string = "initial";
|
|
print("%\n", greeting);
|
|
|
|
first: s32 = 1;
|
|
second: s32 = 2;
|
|
print("% %\n", first, second);
|
|
|
|
ready := true;
|
|
print("%\n", ready);
|
|
|
|
count: s32;
|
|
print("% (a variable starts at zero)\n", count);
|
|
|
|
fruit := "apple";
|
|
print("% and the limit is %\n", fruit, LIMIT);
|
|
}
|