1 Pages (6 items)
Newbie Question1 - Messages
#1 Posted: 3/16/2016 5:18:33 AM
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 Posted: 3/16/2016 6:32:22 AM
Yes it is by design; a variable name cannot start with a number.
![2016-03-16 10_28_27-SMath Studio Desktop - [Page1_].png](/en-US/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](/en-US/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 Posted: 3/16/2016 8:02:09 AM
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 Posted: 3/16/2016 9:57:41 AM
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 users liked this post
Davide Carpi 3/16/2016 2:31:00 PM
#5 Posted: 3/16/2016 11:14:07 AM
Shame on me ...

1 users liked this post
Davide Carpi 3/16/2016 2:30:00 PM
1 Pages (6 items)
-
New Posts
-
No New Posts