Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
exit.c File Reference

Implements the OP_EXIT opcode to terminate the script with an exit code. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 if (vm->sp >=0)

Variables

case OP_EXIT
vm exit_code = code
 return

Detailed Description

Implements the OP_EXIT opcode to terminate the script with an exit code.

Behavior:

  • Pops a value from the stack (if available) and converts it to an integer exit code.
  • Sets vm->exit_code.
  • Stops the VM execution immediately (returns from vm_run).

Definition in file exit.c.

Function Documentation

◆ if()

if(vm->sp >=0)

Definition at line 22 of file exit.c.

Here is the call graph for this function:

Variable Documentation

◆ exit_code

vm exit_code = code

Definition at line 37 of file exit.c.

◆ OP_EXIT

case OP_EXIT

Definition at line 20 of file exit.c.

◆ return

return

Definition at line 38 of file exit.c.