📄 memory.cpp
字号:
//////////////////////////////////////////////////////////////////////
//
// Memory.cpp: implementation of the CMemory class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "memory.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
const long double kZero=0.0;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
//initialization
CMemory::CMemory()
{
bStored=FALSE;
mData=kZero;
}
CMemory::~CMemory()
{
//Do Nothing..
}
//MR
long double CMemory::Read()
{
return mData;
}
//MS
void CMemory::Save( long double data )
{
if (data)
{
mData=data;
bStored=true;
}
}
//MC
void CMemory::Clear()
{
mData=kZero;
bStored=false;
}
//M+
void CMemory::Add( long double inData )
{
mData+=inData;
bStored=true;
}
bool CMemory::isStored()
{
return bStored;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -