summaryrefslogtreecommitdiff
path: root/apl9.h
diff options
context:
space:
mode:
Diffstat (limited to 'apl9.h')
-rw-r--r--apl9.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/apl9.h b/apl9.h
index b15b7e6..9004636 100644
--- a/apl9.h
+++ b/apl9.h
@@ -22,6 +22,7 @@ typedef enum
AtypeInt,
AtypeFloat,
AtypeRune,
+ AtypeMixed,
AtypeArray,
} arrayDataType;
@@ -57,6 +58,7 @@ typedef enum
} errorCodes;
/* Data types */
+typedef struct Mixed Mixed;
typedef struct Array Array;
typedef struct Statement Statement;
typedef struct Operator Operator;
@@ -69,6 +71,16 @@ typedef struct QuadnameDef QuadnameDef;
typedef struct ErrorHandler ErrorHandler;
typedef struct DfnFrame DfnFrame;
+struct Mixed
+{
+ int type;
+ union {
+ vlong i;
+ double f;
+ Rune r;
+ };
+};
+
struct Array
{
arrayDataType type;
@@ -82,6 +94,7 @@ struct Array
vlong *intdata;
double *floatdata;
Rune *runedata;
+ Mixed *mixeddata;
Array **arraydata;
};
};
@@ -222,6 +235,7 @@ Array *arrayitem(Array *, int);
Array *simplifyarray(Array *);
int comparearray(Array *, Array *, int);
Array *fillelement(Array *);
+uvlong arrayspaceused(Array *);
/* eval.c */
Datum *eval(Statement *, int);