This section provides C language CSUB examples for argument types, INTEGER, REAL, Arrays, Strings, and COM data, and an example that defines several CSUBs combined into one CSUB context. These examples are installed into CSUB Toolkit directory HTBWIN\CSUB\EXAMPLE
C Overview
C language CSUBs provide few, if any restrictions or requirements on the writer. The compiler takes care of most of the implementation details. The CSUB routine must return an error value. A value of zero is used for no error, non-zero values are interpreted as standard BASIC error values as given in Appendix A of the HTBasic Reference Manual.
By examining the following programs you can learn the required details to implement most CSUBs. If you have a large number of routines, make sure you examine the last example that demonstrates how to package several routines into one CSUB context.