रेंडरिंगhi

पढ़ो

Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.

Reads input from the active input stream.

Syntax: पढ़ो [पंक्ति]

Category#

io

Examples#

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

Reads input from the active input stream.

# =============================================================================
# पढ़ो — Reads input from the active input stream.
# =============================================================================
#
# What this teaches:
#   • stdin input with `पढ़ो` — reads one line from the active input stream
#   • the `↦ regex` बदलें — compiling a पाठ pattern into a regex value
#
# Common mistakes:
#   • Not checking is null before using the value — read may return null at end of input.
#
# See also: पंक्ति, लिखो
# =============================================================================

# पढ़ो and regex रूपांतरण — I/O read and compiled pattern expressions
#
# स्थिर _ pattern ← "\d+" ↦ regex   -- compiled regex from पाठ
# स्थिर _ input ← पढ़ो                  -- stdin line read
#
# GRAMMAR:
#   रूपांतरण :← stringLit '↦' 'regex'
#   readExpr :← 'पढ़ो'
#
# EXPECTED OUTPUT:
#   Regex pattern diagnostic, then one stdin line (no .expected — interactive).
#
# BACKEND: Rust/Go/roundtrip e2e whitelist — पढ़ो not yet lowered for Rust/Go
# (whitelist: पढ़ो/lege.fab).

main {
    const regex pattern ← "(?i)\d+" ↦ regex
    print pattern
    const string ∪ none input ← read
    print input
}