📄 macro.h
字号:
// ==============================================================
//
// Copyright (c) 2002-2003 by Alex Vinokur.
//
// For conditions of distribution and use, see
// copyright notice in version.h
//
// ==============================================================
// ##############################################################
//
// SOFTWARE : Turing Machine (C++ Implementation)
// FILE : macro.h
//
// DESCRIPTION :
// Various macro
//
// ##############################################################
// ###############
#ifndef _MACRO_H
#define _MACRO_H
#include "version.h"
#define COUT cout << "[ " << setw(12) << left << __FILE__ << ", " << setw (3) << right << __LINE__ << " ] "
#define FATAL_MSG(t) cout << endl; COUT << "FATAL ERROR : " << t << endl
#define ERROR_MSG(t) cout << endl; COUT << "ERROR : " << t << endl
#define WARNING_MSG(t) COUT << "WARNING : " << t << endl
#define DIAGNOSTIC_MSG(t) cout << endl; COUT << "----------- : " << t << endl
#define INFO_MSG(t) cout << string (20, '#') << endl; cout << "INFO : " << t << endl; cout << string (20, '#') << endl
#define IF_NOT_EMPTY(mg, wd, ch) \
if (!mg.empty()) \
{ \
cout << "\t" << string (wd, ch) << " " << mg << " " << string (wd, ch) << endl; \
}
#define MIN_VALUE(x,y) ((x) < (y) ? (x) : (y))
#define MAX_VALUE(x,y) ((x) > (y) ? (x) : (y))
#define ASSERT(x) if (!(x)) {cerr << endl << endl << "\t=== BUG IN PROGRAM ===" << endl;}; assert (x)
#endif // _MACRO_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -