Renderingen-US

pass

Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.

Marks an explicit no-op statement.

Aliases: silent noop

Syntax: pass

Category#

transfer

Examples#

radix/corpus/tacet/tacet.fab (canonical · keyword)#

Marks an explicit no-op statement.

# =============================================================================
# pass — Marks an explicit no-op statement.
# =============================================================================
#
# What this teaches:
#   • Explicit no-op — `pass` as a deliberate empty statement, especially in control flow
#   • Musical rest metaphor — `pass` signals intentional absence of action
#
# Common mistakes:
#   • using pass where logic is expected, which hides missing code; pass is also outside the v1 AIR pure subset
#
# See also: then, return
# =============================================================================


# pass — explicit no-op (musical rest)
#
# pass                                    -- deliberate empty statement
# if <cond> then pass                     -- guarded no-op
#
# GRAMMAR:
#   noopStmt :← 'pass'
#
# EXPECTED OUTPUT:
#   cond true, finis (tacet.expected).

fn maybeNota(bool cond) → void {
    if cond {
        print "cond verum"
    }
    else {
        # deliberate no-op in else branch
        pass
    }
}

main {
    # prints
    maybeNota(true)
    # pass — no output
    maybeNota(false)

    # condition false, so pass never runs
    if false then pass

    print "finis"
}

Expected output:

cond verum
finis