erg/doc/EN/API/procs.md
Shunsuke Shibayama 9b1457b695 Fix #265
2022-12-01 23:02:06 +09:00

686 B

procedures

print!

print!(x) -> NoneType

Returns x with a newline.

debug!

debug!(x, type = Info) -> NoneType

Debug x with newline (file name, line number, variable name is displayed together). Removed in release mode. Emoji-capable terminals are prefixed according to type.

  • type == Info: 💬
  • type == Ok:
  • type == Warn: ⚠️
  • type == Hint: 💡

for! i: Iterable T, block!: T => NoneType

Traverse the iterator with the action of block.

while! cond!: () => Bool, block!: () => NoneType

Execute block! while cond!() is True.

Lineno!() -> Nat

Filename!() -> Str

Namespace!() -> Str

Module!() -> Module