X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=stack.h;fp=stack.h;h=e3f0c441aba4d8299a346f2821a0394ec408c96a;hb=a24bd5195f9990159a974c98751f1473f29b9fa4;hp=0000000000000000000000000000000000000000;hpb=a70d1cdb22b2aa77a34d483403a182e335babf8e;p=calc.git diff --git a/stack.h b/stack.h new file mode 100644 index 0000000..e3f0c44 --- /dev/null +++ b/stack.h @@ -0,0 +1,35 @@ +#ifndef __STACK_H__ +#define __STACK_H__ + +#include "element.h" + +/* global variables */ + +extern int stack_size; + +extern double *stack; + +/* stack management */ + +double get (int n); +double length (); +double pop (); +double push (double val); +double put (int n, double val); +double set (int nbops, element_t **ops); +void show (void); + +/* stack functions */ + +double max (); +double mean (); +double min (); +void order (); +double median (); +double prod (); +double sum (); +double variance (); + +#endif /* __STACK_H__ */ + +/* vim: set ts=4 sw=4 et: */