HelpWizard Pages Linking Technologies2/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 25.x)
Zur Navigation springen Zur Suche springen
Inhalt gelöscht Inhalt hinzugefügt
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 7: Zeile 7:
To call into a C-function inside a library (eg. shared library / dll)
To call into a C-function inside a library (eg. shared library / dll)
or to implement a computation algorithm in C,
or to implement a computation algorithm in C,
you can define a [[Expecco_API/en#Bridged_C_Elementary_Blocks|C-action]]. You would also use this to call into a C++ framework via C entries annotated as "extern C".
create a new C-action and type in the code.
For example the code:
As a first simple example, create one with a single input pin (named "inPin" with type "String") and type in the code:
execute
execute
printf("hello %s\n", stringValue(inPin));
printf("hello %s\n", stringValue(inPin));


could be connected to any other expecco actions and pass a string via the input pin. Here, an expecco dialog pops up, and the entered string is sent to the C function:
This can now be connected to any other expecco actions and a string passed to it via the input pin. Here, an expecco dialog pops up, and the entered string is sent to the C function:

[[Datei:C HelloWorld Action1.png|100px]]
[[Datei:C HelloWorld Action1.png|300px]]


[[Category: HelpWizard/en]]
[[Category: HelpWizard/en]]

Aktuelle Version vom 19. März 2022, 07:25 Uhr

Linking Technologies: C Language Actions

back forward


To call into a C-function inside a library (eg. shared library / dll) or to implement a computation algorithm in C, you can define a C-action. You would also use this to call into a C++ framework via C entries annotated as "extern C".

As a first simple example, create one with a single input pin (named "inPin" with type "String") and type in the code:

execute
   printf("hello %s\n", stringValue(inPin));

This can now be connected to any other expecco actions and a string passed to it via the input pin. Here, an expecco dialog pops up, and the entered string is sent to the C function:



Copyright © 2014-2024 eXept Software AG