calculator.h

来自「该课程设计通过使用flex和bison编写了一个科学计算器的程序」· C头文件 代码 · 共 29 行

H
29
字号
#include<stdio.h>
#include<math.h>
#include<ctype.h>
typedef double(*func_t)(double); /*Function type */
typedef struct
{
    double a;
    double b;
}number;
struct symrec            /*fata type for links in the chain of symbols.*/
{
  char *name;            /*name of symbol*/
  int type;              /*type of symbol:either VAR or FNCT*/
  union{
  number var;            /*value of a VAR */
  func_t fnctptr;        /*value of a FNXT*/ 
  }value;
  struct symrec *next;   /*link field*/ 
};
typedef struct symrec symrec;/*The symbol table:a chain of 'struct symrec'*/
extern symrec *sym_table;
symrec *putsym(char const*,int);
symrec *getsym(char const*);
int maxgys(number Num);
void Display1(number Num);
void Display2(int P,number Num);
void Display3(int P,number Num);
void Display(number Num);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?