渲染zh-Hant

tacet

Translation status: 繁體中文 reader-locale proof. Code fences render through the zh-Hant pipeline; prose is canonical Latin.

Marks an explicit no-op statement.

Aliases: silent noop

Syntax: tacet

Category#

transfer

Examples#

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

Marks an explicit no-op statement.

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


# tacet — explicit no-op (musical rest)
#
# tacet                                    -- deliberate empty statement
# si <cond> ergo tacet                     -- guarded no-op
#
# GRAMMAR:
#   noopStmt :← 'tacet'
#
# EXPECTED OUTPUT:
#   cond verum, 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)
    # tacet — no output
    maybeNota(false)

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

    print "finis"
}

Expected output:

cond verum
finis