mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 18:47:47 +00:00
27 lines
499 B
C
27 lines
499 B
C
#include "main.h"
|
|
|
|
int global = 3;
|
|
_Bool globalBool = 1;
|
|
_Bool globalBool2 = 10; // test narrowing
|
|
float globalFloat = 3.1;
|
|
double globalDouble = 3.2;
|
|
_Complex float globalComplexFloat = 4.1+3.3i;
|
|
_Complex double globalComplexDouble = 4.2+3.4i;
|
|
_Complex double globalComplexLongDouble = 4.3+3.5i;
|
|
|
|
int fortytwo() {
|
|
return 42;
|
|
}
|
|
|
|
int add(int a, int b) {
|
|
return a + b;
|
|
}
|
|
|
|
int doCallback(int a, int b, binop_t callback) {
|
|
return callback(a, b);
|
|
}
|
|
|
|
void store(int value, int *ptr) {
|
|
*ptr = value;
|
|
}
|