संकेतक
Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.
Compatibility annotation for stream/generator posture.
Syntax: @ संकेतक
Category#
async
Related#
Examples#
radix/corpus/cursor/cursor.fab (canonical · keyword)#
Compatibility annotation for stream/generator posture.
# =============================================================================
# संकेतक — Compatibility annotation for stream/generator posture.
# =============================================================================
#
# What this teaches:
# • Preferred stream posture — write `जनक` for a synchronous stream or
# `async_जनक` for an asynchronous stream.
# • Compatibility annotation — `@ संकेतक` remains accepted and preserved as
# the legacy spelling for stream/generator posture.
#
# Common mistakes:
# • Using `आगेबढ़ो` outside a stream body — `आगेबढ़ो` is valid only inside `जनक`
# or `async_जनक` bodies, including compatible `@ संकेतक` declarations.
#
# See also: जनक, async_जनक, आगेबढ़ो
# =============================================================================
# संकेतक — compatibility stream annotation
#
# GRAMMAR:
# annotation :← '@' 'संकेतक'
# callablePosture :← 'जनक' | 'async_जनक'
#
# EXPECTED OUTPUT:
# Scalar stdout smoke (see body).
#
# BACKEND:
# Cross-ref: भविष्य/futura.fab, दोहराओ/cursor-iteratio.fab; Go whitelist: संकेतक/cursor.fab.
#
@ संकेतक { }
fn stream() → int {
yield 1
yield 2
}
main {
print stream()
}Expected output:
[1, 2]