Checking programs
Checking finds common code problems without running the program. Use it before work that changes files, sends requests, or runs commands.
Check one file
creole --check program.crloA useful error includes:
- the file name
- the exact line and position
- the source instruction
- a clear explanation
- a suggested correction
What the checker finds
The checker can identify problems such as:
- an open block without
End. - an extra
End. - a misplaced
Else.orOtherwise. - likely misspelled instructions
- invalid sentence structure
Correct the first reported problem, save the file, and check again.
Format a program
creole --format program.crloFormatting keeps block indentation and spacing consistent. Review important changes before committing them to a project.
Check in small steps
A reliable workflow is:
- make one small change
- save the file
- run the checker
- correct the first problem
- run the program with safe test data
- confirm the result
Test success and failure
Do not test only the expected input. Also test:
- empty text
- zero and negative numbers
- missing files
- unavailable connections
- unsuccessful API responses
- large but allowed values
- incorrect terminal arguments
A useful program explains what went wrong instead of failing silently.
Safe project habits
- Keep API keys outside source files.
- Set request time and response-size limits.
- Check paths before deletion or replacement.
- Keep project files inside the project folder.
- Test connections with non-sensitive data.
- Use small connected modules with one clear job.
- Keep permanent regression tests for fixed problems.
- Delete temporary test files and caches after testing.
Read an error calmly
Start with the file and line number. Read the source instruction shown by the checker. Compare it with the suggested form, then make the smallest correction needed.
Do not change several unrelated instructions at once. Small corrections make the real cause easier to understand.
Final learning checklist
- I check a file before risky work.
- I understand file and line information.
- I close every block with
End.. - I test failures and edge cases.
- I keep secrets outside source files.
- I keep modules small and clear.
- I remove temporary test data.
Keep learning
You now have the foundation for building readable Creole programs: values, decisions, collections, modules, files, APIs, streams, automation, mathematics, and safe checking.
Build one small project, check it often, and improve it one clear step at a time.