The Void — Exit/Sleep
Exit the program with optional exit code.
// Exit successfully
Oyeku.exit();
// Exit with error code
Oyeku.exit(1);
Pause execution for specified milliseconds.
Irosu.fo("Starting...");
Oyeku.sleep(1000); // Wait 1 second
Irosu.fo("Done!");
// Animation delay
fun i ninu Iwori.range(0, 5) {
Irosu.fo(".");
Oyeku.sleep(500);
}
// Main program
Irosu.fo("Program starting...");
// Do work
ayanmo success = otito;
ti (success) {
Irosu.fo("Program completed successfully!");
Oyeku.exit(0);
} bib?k? {
Irosu.fo("Program failed!");
Oyeku.exit(1);
}