Control Flow

1. Logic (If / Or)

BigC uses a flat structure for logic. No indentation is needed for if blocks.

Basic Syntax:

if [Condition] & [Command]

# Multi-line Block (Flat)
if [Condition]
print "Condition met"
or
print "Condition not met"

Advanced "Or If" Logic:

if Score > 90
print "Grade: A"
or if Score > 80
print "Grade: B"
or
print "Grade: F"

2. The Mechanics of Failure

BigC is built to be "Crash-Proof." Instead of stopping the program with an error, the engine returns specific fallback values that you can check.

ActionResult on FailureHow to detect
BigNet (Web)"BigNet Error..."bmath Var @"^BigNet Error"
Books (File)"" (Empty String)if Var == ""
Math0if Var == 0
JSON"nothing"if Var == "nothing"

Native Error Check

You can use the bug found syntax immediately after an action to detect a failure natively.

Example:

get web "https://broken-link.com" & set as {Response}

if any bug found
    print "Error: Connection failed!"
or
    print "Success: $Response"

3. Loops (Strict Indentation)

Loops are the only time BigC uses indentation (4 spaces or 1 tab) to indicate repetition.

Syntax:

start loop
    print "Repeating..."
keep [Condition]

4. Chapters (Functions)

Chapters are reusable blocks of code. Use addrun to execute them.

start chapter Greet
print "Hello!"
end chapter

addrun Greet

5. Background Tasks (Threads)

Run a chapter in another thread without blocking the main program.

Syntax: run background [ChapterName]

run background LoggingTask