dos_compilers/Logitech Modula-2 v34/EXAMPLES/MOD-C
2024-07-02 07:25:31 -07:00
..
C.C Logitech Modula-2 v3.4 2024-07-02 07:25:31 -07:00
C.DEF Logitech Modula-2 v3.4 2024-07-02 07:25:31 -07:00
MAIN.MOD Logitech Modula-2 v3.4 2024-07-02 07:25:31 -07:00
MAKE.BAT Logitech Modula-2 v3.4 2024-07-02 07:25:31 -07:00
README.DOC Logitech Modula-2 v3.4 2024-07-02 07:25:31 -07:00

This example shows a simple program in Modula-2 with calls to C procedures.

Special attention has to be given to the following points:

- Modula-2 handles only far code and far data.  Use the 'far' keyword in
  C for all data and procedures used also in Modula-2, or compile with the
  C compiler option /AL to use the large memory model.
  
- C doesn't provide real string variables.  Strings are handled with
  pointers to arrays of characters.  Use pointers also in Modula-2 or
  use the knowledge about the implementation and pass the string
  length along with the pointer.