3 ms·
After Python and Java, Pascal feels unsettling. All the code examples I've seen so far put hundreds of lines in a single main file, making it incredibly difficu
by jplayer01 8y ago
After Python and Java, Pascal feels unsettling. All the code examples I've seen so far put hundreds of lines in a single main file, making it incredibly difficult to read and understand. I'm not sure if I'm approaching it incorrectly or what (and I'm open to advice on how to read Pascal code and how to organize my own).
- sysrpl 8y agoYou don't need to put everything in one file. Just add a new unit (a source code file), and separate your code by functional use into those distinct units. If you have enough units that are all related and you want to separate the code even further, put them into their own packages and import them into other projects. You can be disorganized in any programming environment. It's your job as the programmer to name things correctly and break apart common code or task into their own reusable compartments.