📄 type.h
字号:
#ifndef __TYPE.H__
#define __TYPE.H__
#include "Const.h"
// 布尔定义
typedef int bool;
// 编辑模式
enum Mode
{
MenuMode,
EditMode
};
// 变量类型
enum VarType
{
Integer, // 整数
Real, // 实型
Array, // 数组
SystemFunc, // 系统函数
NoType // 无类型
};
// 变量类型检索表类型
struct VarAllType
{
char Name[MaxLenOfVar];
VarType Type;
VarAllType *NextVar;
};
// 整型变量类型
struct VarIntType
{
char Name[MaxLenOfVar];
int Value;
VarIntType *NextVar;
};
// 实型变量类型
struct VarRealType
{
char Name[MaxLenOfVar];
double Value;
VarRealType *NextVar;
};
// 数组变量元素类型
struct VarArrayElemType
{
int Value;
VarArrayElemType *NextElem;
};
// 数组变量头类型
struct VarArrayHeadType
{
// 数组名
char Name[MaxLenOfVar];
// 各位下标的范围
int Dim[MaxDim];
// 用于元素定位的因数
int Coefficient[MaxDim];
// 数组维数
unsigned char TotDim;
// 元素指针
VarArrayElemType *HeadElem, *TailElem;
// 下一个数组头指针
VarArrayHeadType *NextArray;
};
// 文本行类型
struct LineType
{
// 存储文本行
char Line[MaxY];
// 存储着色特征码
char Sign[MaxY];
// 该行标记标志
char Mark;
// 该行断点标志
char Break;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -