Skip to content

Modern Tui TuiQuit

Paul Squires edited this page Oct 19, 2026 · 6 revisions

Home › Terminal TUI Library › Application Loop › TuiQuit

TuiQuit

Returns a command that ends the loop, so TuiRun returns the given exit code.

Syntax

TuiQuit( byval code as int32 = 0 ) as TuiCmd

Description

Leave the loop and return an exit code from TuiRun. Returning this from Init exits before the first frame is drawn.

Example

#import "std/tui"
using tui

print TuiQuit( ).arg              '' 0 -- the default
print TuiQuit( 3 ).arg            '' 3
print TuiQuit( 3 ).kind = TUICMD_QUIT '' -1 (true)

See also

TuiApp TuiApp.Update TuiApp.Shutdown TuiNone TuiTick TuiSuspend
TuiApp.Init TuiApp.View TuiCmd TuiRedraw TuiInvalidate TuiRun

Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Application Loop
Working examples: hello.tiko · form.tiko · dashboard.tiko


Home · Keyword Index

Clone this wiki locally