1 страниц (6 вхождений)
Newbie Question1 - Сообщения
#1 Опубликовано: 16.03.2016 05:18:33
Hi,
as usually a simple question.
I want to define on the canvas a variable whose name is 1stPosition and inizialize its value to 1 .
What I would like to knwow is if it is by design that I achieve this ...

so it is always added a unit of measure when I enter with the keyboard s or S , so after this happens I need to delete what has been added and this continue to happen as I key as text something that is a predefined unit ..at least is what I see.
I am using the last night build.
Best regards
Franco
as usually a simple question.
I want to define on the canvas a variable whose name is 1stPosition and inizialize its value to 1 .
What I would like to knwow is if it is by design that I achieve this ...
so it is always added a unit of measure when I enter with the keyboard s or S , so after this happens I need to delete what has been added and this continue to happen as I key as text something that is a predefined unit ..at least is what I see.
I am using the last night build.
Best regards
Franco
#2 Опубликовано: 16.03.2016 06:32:22
Yes it is by design; a variable name cannot start with a number.
![2016-03-16 10_28_27-SMath Studio Desktop - [Page1_].png](/ru-RU/file/XuEDhQ/2016-03-16-10_28_27-SMath-Studio-Desktop---_Page1___png)
This is a standard almost everywhere (there are few exceptions); it keeps consistent and fast how to identify a variable both for humans and for the core (because you have to check only the first character).
You can use p1, pos1, Position1st, ...
If you define a variable with the same name of a unit, the variable s shown as first in the dynamic assistance, otherwise you have to type at least another character (if there is a 1-character unit or function already defined)
![2016-03-16 10_34_35-SMath Studio Desktop - [Page1_].png](/ru-RU/file/AHH7KK/2016-03-16-10_34_35-SMath-Studio-Desktop---_Page1___png)
This is a standard almost everywhere (there are few exceptions); it keeps consistent and fast how to identify a variable both for humans and for the core (because you have to check only the first character).
You can use p1, pos1, Position1st, ...
If you define a variable with the same name of a unit, the variable s shown as first in the dynamic assistance, otherwise you have to type at least another character (if there is a 1-character unit or function already defined)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Опубликовано: 16.03.2016 08:02:09
Davide
Thanks a lot for your feedback , now it is clear and I will follow your suggestions for the future variables naming .
The only thing that doesn't fit well is that on my Smath when I write the same as you ( so 12345 equal something ) ..I do not see the error description as shown in your screen shot.
Best regards
Franco
Thanks a lot for your feedback , now it is clear and I will follow your suggestions for the future variables naming .
The only thing that doesn't fit well is that on my Smath when I write the same as you ( so 12345 equal something ) ..I do not see the error description as shown in your screen shot.
Best regards
Franco
#4 Опубликовано: 16.03.2016 09:57:41
WroteThe only thing that doesn't fit well is that on my Smath when I write the same as you ( so 12345 equal something ) ..I do not see the error description as shown in your screen shot.
It appears when you press F9.
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Davide Carpi 16.03.2016 14:31:00
#5 Опубликовано: 16.03.2016 11:14:07
Shame on me ...

1 пользователям понравился этот пост
Davide Carpi 16.03.2016 14:30:00
1 страниц (6 вхождений)
-
Новые сообщения
-
Нет новых сообщений