ComenC:Minimum Example

ComenC:Minimum Example

From ClearSy Tools

(Redirected from Minimum Example)
Jump to: navigation, search

Considering the minimum components M0 and M1, defined as

  MACHINE M0 
  END 
  IMPLEMENTATION M1 
  REFINES M0 
  END 

The ComenC translator produces 2 files: M0.c and M0.h

  /****************************************************************************** 
  File Name               : M0.c 
  Date                    : 02/04/2008  16:42:16 
  C Translator Version    : b2c V1.0 (08/08/2007) 
  ******************************************************************************/ 
  /*-------------------------- 
  Added by the Translator 
  --------------------------*/ 
  #include "b2c.h" 
  #include "M0.h" 
  /*------------------------ 
  INITIALISATION Clause 
  ------------------------*/ 
  void M0__INITIALISATION(void) { 
  } 

and

  /****************************************************************************** 
  File Name               : M0.h 
  Date                    : 02/04/2008  16:42:16 
  C Translator Version    : b2c V1.0 (08/08/2007) 
  ******************************************************************************/ 
  #ifndef _M0_h 
  #define _M0_h 
  /*-------------------------- 
  Added by the Translator 
  --------------------------*/ 
  #include "b2c.h" 
  /*------------------------ 
  INITIALISATION Clause 
  ------------------------*/ 
  extern void M0__INITIALISATION(void); 
  #endif