Programming rules.

CalculiX CrunchiX is a mixture of FORTRAN77 (with elements from FORTRAN90) and C. C is primarily used for automatic allocation and reallocation purposes. FORTRAN is the first language I learned and I must admit that I'm still a FORTRAN addict. I use C where necessary, I avoid it where possible. Roughly speaking, the main routine and some of the routines called by main are in C, the others are in FORTRAN. This means that no C routine is called by a FORTRAN routine, a FORTRAN routine may be called by a C routine or a FORTRAN routine. There are NO commons in the code. All data transfer is through arguments of subroutine calls. All arguments are transferred by address, not value (there may be one or two exceptions on this rule in the code).

In summary, the following programming rules apply:

This set of rules grew out of my long-year experience with C and FORTRAN. These are personal preferences, and some of them are really useful in order to avoid different-to-trace programming errors. If you want to contribute to CalculiX, I expect you to adhere to these rules.

Starting with version 2.8 the environment variable CCX_LOG_ALLOC has been introduced. If set to 1 (default is zero) one gets detailed information on all allocated, reallocated and deallocated fields during the executation of CalculiX. This may be particularly important during debugging of segmentation faults.