mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
41 lines
1.1 KiB
Markdown
41 lines
1.1 KiB
Markdown
# 过程
|
||
|
||
[](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/API/procs.md&commit_hash=06f8edc9e2c0cee34f6396fd7c64ec834ffb5352)
|
||
|
||
## print!
|
||
|
||
```python
|
||
打印!(x)->无类型
|
||
```
|
||
|
||
使用换行符返回 x
|
||
|
||
## 调试&排除;
|
||
|
||
```python
|
||
调试!(x,类型=信息)-> NoneType
|
||
```
|
||
|
||
用换行符调试 x(文件名、行号、变量名一起显示)。在发布模式中删除
|
||
支持表情符号的终端根据类型加前缀
|
||
|
||
* type == Info: 💬
|
||
* type == Ok: ✅
|
||
* type == Warn: ⚠️
|
||
* type == Hint: 💡
|
||
|
||
## for!i: Iterable T, block: T => NoneType
|
||
|
||
以块的动作遍历迭代器
|
||
|
||
## while! cond!: () => Bool, block!: () => NoneType
|
||
|
||
当cond!()为True时的执行块
|
||
|
||
## Lineno!() -> Nat
|
||
|
||
## Filename!() -> Str
|
||
|
||
## Namespace!() -> Str
|
||
|
||
## Module!() -> Module
|