11 — Check & Build: see the Python
nme check and nme build show what your NME really is. check asks Python
whether the generated program is valid; build shows the generated Python
itself.
Steps
Verify a program without running it:
nme check hello nme c hellocheckprints nothing when the program is fine — silence means success.nme cis the shortcut.See the Python your program becomes:
nme build hello -o hello.py python3 hello.pyFor
show Hello world!,hello.pycontains:print("Hello world!")Reading this is how you grow into Python one line at a time.
Every error has a stable code. Deliberately put
breakoutside a loop Save this asbroken.nme— abreakwith no loop around it — and check it:nme c brokenThe compiler prints the code, the exact line, and a hint:
error[E0102]: `break` can only be used inside a loop --> broken.nme:1:1 | 1 | break | ^^^^^ = hint: put it inside `while ... end` or `repeat ... end`Read the long explanation of a code in Korean or English:
nme ko E0102 nme en E0102nme koalone lists every code.
Try it yourself
Check every guide program you wrote so far with nme c <file>, then build one
and read its Python.
What you learned
nme check/nme cverifies without running; silence means success.nme build/nme bprints the generated Python;-osaves it.- Error messages carry codes like
E0102with an exact caret and hint. nme ko <CODE>/nme en <CODE>explain each code.