mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-03 05:59:02 +00:00
8 lines
299 B
Nim
8 lines
299 B
Nim
# Helper: defines a generic whose body uses TScopeSize via the strformat `&`
|
|
# macro (late-bound), resolved in THIS module's scope (mtscopea -> 65).
|
|
import mtscopea, std/strformat
|
|
export mtscopea
|
|
func fromRaw*[T](x: T): string =
|
|
const msg = &"size {TScopeSize - 1}"
|
|
result = msg & " " & $int(x)
|