Menu

Compiled Language syntax

Shmuel Safonov

The following differ the language compiled by TMC compiler from MATLAB(TM) language :

  • No graphics and GUI support. The generated code is suggested to be a library used by an application that provides its own GUI. However for debugging purpose code that may call user-provided graphics may be generated.
  • Only functions are compiled, not scripts; each file may contain a single function only with the same name as the fie itself, case-sensitive.
  • The usage of 'end' keyword has some restrictions. The simple matrixes are supported but not expressions like strct.fld(end)
  • The expression of 'if' command should be separated from instructions body by ',' or newline separator.
  • Only 2D matrixes are supported; the 3D matrixes may be supported in future.
  • Structure arrays are not supported. User is recommended to use cell arrays to replace them.
  • Cell arrays may be indexed only by simple scalar index: e.g S{n} where n is a number, not array.
  • Logical variables are not supported. E.g.:
    x = [1,2,3].
    Expression x(x>1) that in MATLAB results in [2,3], in TMC language is equal to x([0,1,1]) and produces an error. User
    should replace the expression code by x(find(x>1)).
  • No classes support
  • try/catch are supported by the host platform and C compiler: this works with MS VC, Borland C Builder but doesn't work with Android/Linux GNU C.
  • Symbols detected as functions (in-build functions e.g.) and reserved symbols for j=i=sqrt(-1) may not be re-assigned to become variables. Thus j and i may not be used as variables !

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.