Newbie Question1

Newbie Question1 - Poruke

#1 Objavljeno: 16. 3. 2016. 05:18:33
frapuano

frapuano

13 svidjanja u 115 postova.

Grupa: User

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 ...

sshot-1.png


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 Objavljeno: 16. 3. 2016. 06:32:22
Davide Carpi

Davide Carpi

1.444 svidjanja u 2.936 postova.

Grupa: Moderator

Yes it is by design; a variable name cannot start with a number.

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
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Objavljeno: 16. 3. 2016. 08:02:09
frapuano

frapuano

13 svidjanja u 115 postova.

Grupa: User

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
#4 Objavljeno: 16. 3. 2016. 09:57:41
Вячеслав Мезенцев

Вячеслав Мезенцев

1.558 svidjanja u 1.868 postova.

Grupa: Moderator

Wrote

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.


It appears when you press F9.
Russia ☭ forever, Viacheslav N. Mezentsev
1 korisnika je svidelo ovu objavu
Davide Carpi 16. 3. 2016. 14:31:00
#5 Objavljeno: 16. 3. 2016. 11:14:07
frapuano

frapuano

13 svidjanja u 115 postova.

Grupa: User

Shame on me ...
1 korisnika je svidelo ovu objavu
Davide Carpi 16. 3. 2016. 14:30:00
#6 Objavljeno: 16. 3. 2016. 15:16:32
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User


Forum Var Numeric.gif
1 korisnika je svidelo ovu objavu
frapuano 16. 3. 2016. 17:13:00
  • Novi postovi
  • Nema novih postova