Newbie Question1

Newbie Question1 - Сообщения

#1 Опубликовано: 16.03.2016 05:18:33
frapuano

frapuano

13 сообщений из 115 понравились пользователям.

Группа: 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 Опубликовано: 16.03.2016 06:32:22
Davide Carpi

Davide Carpi

1415 сообщений из 2872 понравились пользователям.

Группа: 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 Опубликовано: 16.03.2016 08:02:09
frapuano

frapuano

13 сообщений из 115 понравились пользователям.

Группа: 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 Опубликовано: 16.03.2016 09:57:41
Вячеслав Мезенцев

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

1402 сообщений из 1708 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Davide Carpi 16.03.2016 14:31:00
#5 Опубликовано: 16.03.2016 11:14:07
frapuano

frapuano

13 сообщений из 115 понравились пользователям.

Группа: User

Shame on me ...
1 пользователям понравился этот пост
Davide Carpi 16.03.2016 14:30:00
#6 Опубликовано: 16.03.2016 15:16:32
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User


Forum Var Numeric.gif
1 пользователям понравился этот пост
frapuano 16.03.2016 17:13:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений