summaryrefslogtreecommitdiff
path: root/apl9.h
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-16 00:48:37 +0000
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-16 00:48:37 +0000
commitde3bbbc0981bde7a02f7f5398ce921e0beb4c174 (patch)
tree88813af01d0d16a19a205f4bd0f07fcc555d5a81 /apl9.h
parentf02e90b27e37f91d4409842dd21cd00c999c805d (diff)
Implement floats
Diffstat (limited to 'apl9.h')
-rw-r--r--apl9.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/apl9.h b/apl9.h
index f65e8f7..f15cd77 100644
--- a/apl9.h
+++ b/apl9.h
@@ -22,6 +22,7 @@ typedef enum
typedef enum
{
AtypeInt,
+ AtypeFloat,
AtypeArray,
} arrayDataType;
@@ -58,6 +59,7 @@ struct Array
union {
char *rawdata;
vlong *intdata;
+ double *floatdata;
Array **arraydata;
};
};
@@ -154,11 +156,13 @@ Statement *lexline(Rune *);
/* array.c */
Array *mkscalarint(vlong);
+Array *mkscalarfloat(double);
Array *duparray(Array *);
int simplearray(Array *);
int simplescalar(Array *);
Array *extend(Array *, Array *);
int scalarextend(Array *, Array *, Array **, Array **);
+int commontype(Array *, Array *, Array **, Array **, int);
Array *arrayitem(Array *, int);
Array *simplifyarray(Array *);
@@ -169,7 +173,6 @@ Datum *eval(Statement *);
Symbol *getsym(Symtab *, Rune *);
Symtab *newsymtab(void);
void freesymtab(Symtab *);
-vlong globalIO(void);
/* memory.c */
void *emalloc(ulong);
@@ -230,3 +233,4 @@ extern Symtab *globalsymtab; /* symbol.c */
extern Symtab *currentsymtab; /* symbol.c */
extern int alloccounts; /* memory.c */
extern QuadnameDef quadnames[]; /* quadnames.c */
+extern int printprecision; /* print.c */ \ No newline at end of file