summaryrefslogtreecommitdiff
path: root/apl9.h
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-22 16:53:29 +0000
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-22 16:53:29 +0000
commit9c93bc20cc68e50461bb086f24f335de9dcc5135 (patch)
treeff860c161b890feaa16846ce00fe6c55c2929db5 /apl9.h
parent071bef0ccfca9137eb3c814cbc9552f02e6f1b4d (diff)
Implement ⎕DIV for allowing division by zero to result in 0 if needed
Diffstat (limited to 'apl9.h')
-rw-r--r--apl9.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/apl9.h b/apl9.h
index dc38112..12bfc03 100644
--- a/apl9.h
+++ b/apl9.h
@@ -135,13 +135,14 @@ struct Symbol
Rune *name;
Datum value;
Datum *(*getfn)(void);
- int (*setfn)(Datum);
+ void (*setfn)(Datum);
};
struct Symtab
{
int nsyms;
int io; /* index origin */
+ int div; /* division method */
Symbol **syms;
};
@@ -155,7 +156,7 @@ struct QuadnameDef
Rune *name;
datumTag tag;
Datum *(*get)(void);
- int (*set)(Datum);
+ void (*set)(Datum);
fnmonad monadfn;
fndyad dyadfn;
opmonad monadop;