semantic.h

来自「用VC做的一个简单编译器.实现简单的画图」· C头文件 代码 · 共 35 行

H
35
字号

// ----------------------------- semantics.h ---------------------------------

#include <windows.h>
#include <windows.h>
#include <wingdi.h>
extern HDC hDC;
#include "..\\funcdraw\\parser.h"

#define red RGB(255,0,0)		// 红色

#define blue RGB(0,0,255)		//蓝色

#define green RGB(0,255,0)		//绿色

#define black RGB(0,0,0)		//黑色

// ------------------------ 外部函数声明
extern void   DrawPixel(unsigned long x, unsigned long y);	// 绘制一个点
extern double GetExprValue(struct ExprNode * root);			// 获得表达式的值
extern void   DrawLoop(double Start,						// 图形绘制
					   double End,
					   double Step,
					   struct ExprNode * HorPtr,
					   struct ExprNode * VerPtr);
extern void   DelExprTree(struct ExprNode * root);			// 删除一棵树

#ifdef _BC_COMPILER
  extern int  InGraphMode;
  extern int  InitGraph  (void);
  extern void CloseGraph (void);
#endif


⌨️ 快捷键说明

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