[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
//Вот примерно так:
ulong code N10[] = { 1, 10, 100, 1000,
10000, 100000, 1000000,
10000000, 100000000
};
//подпрограмма редактирования разряда параметра
void Edit_Digit (uchar idata *ParBufferASCII,uchar PosCursor, char dir)
//dir=1 - инкремент разряда
//dir=-1 - декремент разряда
{
uchar data symb; //пределное значение разряда
if (dir == 1) symb = '9';
else symb = '0';
if (ParBufferASCII[PosCursor] != symb )
ParBufferBin += dir* N10[Pos->PosCursor];
}
//ParBufferASCII ASCII строка параметра
//ParBufferBin собственно сам параметр
//PosCursor позиция курсора (в ASCII строкe)
E-mail: info@telesys.ru