Lhogho  0.0.028
 All Data Structures Files Functions Variables Typedefs Macros Pages
External

The external module contains functions which support a bidirectional interface between Lhogho and other programming languages. Namely, it supports;

  • convertion Logo datum into processor-based datum
  • convertion from processor-based datum into Logo datum
  • calling a function written in another programming language from a program written in Lhogho
  • calling a Logo function from a program written in another programming language.
  • API (external.h)
  • Implementation (external.c)

Datum conversion is done through packs. A pack roughly corresponds to a struct in C, a record in Delphi, and so on. Data in a pack is stored in a native for the processor format.

Trans-language calls are supported by wrapping the Logo function in a special code which performs the desired conversion.

External functions are functions which are written in another programming language. Lhogho needs to have a Logo-based declaration which is wrapped by code converting Logo-datum parameters into native format. When the external function is complete, the wrapper converts the result back into a Logo datum.

Internal functions are Logo functions which are called by external code (e.g. callbacks). The wrapper converts the parameters which are in native format into Logo data. When the Logo functions is complete it converts back the result into native format.


[ HOME | INDEX | ATOMS | VARS | REFERENCE ]
Lhogho Developer's Documentation
Wed Jul 10 2013