-
-
Notifications
You must be signed in to change notification settings - Fork 24
OSL ‐ Program Flow
Mistium edited this page Dec 1, 2023
·
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
-
until condition (commands):- The
untilstatement is used to repeat a block of code until a condition is met. - Example:
until boolean (
- The
-
goto "label_name":- The
gotocommand is used to jump to a specified label within the script. - Example:
goto "label_name"
- The
-
label_name::- The
labelcommand defines a label that can be used as a target for thegotocommand.
- 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