Добавляем поддержку отрицательных чисел в сценарии

This commit is contained in:
2022-08-31 08:52:43 +03:00
parent 1c5de5b92e
commit 0dac2b0528

View File

@@ -613,8 +613,14 @@ int IoTScenario::gettok() {
return tok_identifier;
}
String NumStr="";
if (LastChar == '-') {
LastChar = getLastChar();
if (isdigit(LastChar)) NumStr = "-";
else return '-';
}
if (isdigit(LastChar)) { // Число: [0-9.]+
String NumStr;
do {
NumStr += (char)LastChar;
LastChar = getLastChar();