|
CS 456 - Systems Programming
Spring 2024
|
Displaying ./code/apr17/rpn.h
//include statements
#include <stdio.h>
#include <stdlib.h>
//define statements
#define MAXSIZE 100 // maximum size of stack
#define MAXOPSIZE 20 // maximum size of operand, operator
#define NUMBER '0' // indicates number found
#define TOOBIG '9' // indicates string is too big
// function prototypes
double push(double number); // push number onto stack, returning pushed value
double pop(); // pop top value from stack
void clear_stack(); // reset stack to be empty
int getop(char *dest, int limit); //gets operand
|