mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 03:49:13 +03:00
Добавляем поддержку отрицательных чисел в сценарии
This commit is contained in:
@@ -613,8 +613,14 @@ int IoTScenario::gettok() {
|
|||||||
return tok_identifier;
|
return tok_identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String NumStr="";
|
||||||
|
if (LastChar == '-') {
|
||||||
|
LastChar = getLastChar();
|
||||||
|
if (isdigit(LastChar)) NumStr = "-";
|
||||||
|
else return '-';
|
||||||
|
|
||||||
|
}
|
||||||
if (isdigit(LastChar)) { // Число: [0-9.]+
|
if (isdigit(LastChar)) { // Число: [0-9.]+
|
||||||
String NumStr;
|
|
||||||
do {
|
do {
|
||||||
NumStr += (char)LastChar;
|
NumStr += (char)LastChar;
|
||||||
LastChar = getLastChar();
|
LastChar = getLastChar();
|
||||||
|
|||||||
Reference in New Issue
Block a user