-
-
Notifications
You must be signed in to change notification settings - Fork 24
OSL ‐ Program Flow
Mistium edited this page Jan 8, 2024
·
15 revisions
-
mainloop::- This is a label that serves as the entry point for an application's script after the first run cycle. It's where the program starts running after the initial setup.
-
if condition (commands):- The
ifstatement is used to test a condition. If the condition is true, the code within the block (enclosed in parentheses) is executed.
- The
if condition (
command
command
)
---
if condition (
command
command
) else (
command
command
)
---
if condition "command"
---
if condition "command" else "command"
-
loop number-of-times (commands):- The
loopstatement is used to repeat a block of code a specified number of times. - Example:
loop number-of-times (
- The
-
while condition (commands):- The
whilestatement is used to repeat a block of code while a condition is true. - Example:
while boolean (
- The
-
import "file_path"orimport "file_name" "file_type":- The
importcommand is used to run another OSL file's data. You can specify the file by its path or name and type.
- The
-
run ["command","command2"]:- The
runcommand is used to loop through a JSON array and execute the specified commands inside the array.
- The
originOS is a web desktop gui with a self contained file system, programming languages, internet system and a whole lot of stuff an os should be able to do Use originOS here