How to define a vraible as numeric so that I can increase counter ?

Robejon

Пользователь
Регистрация
11.11.2017
Сообщения
40
Благодарностей
4
Баллы
8
Hi,
I have a file which has contains one line which is a number . ( Example : 212)
I used File processing to Read text from that file and assigned a variable."number"
Hence variable "number" now contains= 212

Later I tried to increase counter on that variable .. but it failed ,probably because it was taken as a string.
How can I assign that as a numeric variable ?
Thanks
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
Hi. There is no difference number or string in zenno options, It should work as You tried to do.

What error do You get ?
Do not You have spaces before or after number ?
 

Robejon

Пользователь
Регистрация
11.11.2017
Сообщения
40
Благодарностей
4
Баллы
8
No I do not have spaces . It simply returns "project failed "
 

Robejon

Пользователь
Регистрация
11.11.2017
Сообщения
40
Благодарностей
4
Баллы
8
Please check the attached file.
You may give any number inside the text file
 

Вложения

Robejon

Пользователь
Регистрация
11.11.2017
Сообщения
40
Благодарностей
4
Баллы
8

copper12

Client
Регистрация
26.11.2016
Сообщения
1 111
Благодарностей
260
Баллы
63
Did you get the error "Variable is not a number"?
 

Robejon

Пользователь
Регистрация
11.11.2017
Сообщения
40
Благодарностей
4
Баллы
8

copper12

Client
Регистрация
26.11.2016
Сообщения
1 111
Благодарностей
260
Баллы
63

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113

copper12

Client
Регистрация
26.11.2016
Сообщения
1 111
Благодарностей
260
Баллы
63

Robejon

Пользователь
Регистрация
11.11.2017
Сообщения
40
Благодарностей
4
Баллы
8
Yes now working correctly.
Solution: Increased by 1
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)