ASCII art diagram converter: Difference between revisions

m
Fixed typo.
m (Fixed typo.)
Line 873:
So, the behavior when using structures built at compile time and structure built at runtime is different. For a variable “s”, reading the content of field “f” is done using the normal syntax “s.f” in the first case and using “s.get("f")” in the second case.
 
Of course, we the second mechanism may be used for all cases. The first mechanism is mainly interesting to show how it is possible, using Nim powerful macro system, to create a type ''ex nihilo''.
 
<lang Nim>import macros
Anonymous user