Dart Code Examples/en

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen

Pin Access, Generating Logs[Bearbeiten]

Create a new Dart action, and add an output pin named "out1". Uncomment the pin-output write line.

import 'dart:io'; 
import 'expecco';

main() {
    String message = 'Hello again';
    String inVal = '$(in1)';
    
    print('Hello World from Dart');
    stderr.writeln(':logInfo:${message}');
    logInfo('another info');
    out('out1', 'a value at a pin');
    logInfo(inVal);
}

Notice the import of the 'expecco' pseudo package, which defines a number of functions (logInfo, logWarning, etc. as described in Predefined_Functions).
The input pin's value is read with "$(in1)".
The output is written with "out('out1', ...);"



Copyright © 2014-2024 eXept Software AG