Variable definition using commas

Variable definition using commas - Example: VRd,max (VRd"comma"max) - Сообщения

#1 Опубликовано: 07.03.2019 10:11:06
jfs

jfs

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

Группа: User

Hi,

Is it possible to use commas on variables definition (example: VRd,max -> VRd"comma"max <-)? If I define a variable in this way, the Smath sheet works fine. The problem is, when I save it and re-open the file, the commas on the variables disappear (i.e. "VRd,max" becomes "VRdmax" after saving). It might seem a silly/shallow question, but for example when using structural engineering standards (i.e. AISC or Eurocodes) there are several predefined variables which have commas on its name/definition. Visually, it makes a world of difference. It would be very useful if Smath would be able to keep the commas on the variables names after saving the files.

Thanks,
JFS
#2 Опубликовано: 07.03.2019 11:21:36
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

It would be very useful if Smath would be able to keep the commas on the variables names after saving the files.



1. Open fresh work sheet
2. Tools [from Menu] => Options => Argument Separator => check "coma"
3. Construct your document
4. Save ... re-open to sanity the coma separators.
#3 Опубликовано: 07.03.2019 11:44:07
jfs

jfs

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

Группа: User

Jean,

Many thanks for your swift answer. I tried implementing what you have suggested but for some reason didn't work (comma could only be used in fuction's arguments or in text - not in variables definition).

I am using Smath version 0.99 (build: 6995) - just in case it makes any difference.

Thanks,
JFS
#4 Опубликовано: 07.03.2019 13:36:29
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

Jean,

Many thanks for your swift answer. I tried implementing what you have suggested but for some reason didn't work (comma could only be used in fuction's arguments or in text - not in variables definition).

I am using Smath version 0.99 (build: 6995) - just in case it makes any difference.

Thanks,
JFS


Do you mean you want to define X,:=1.23456789
I have never seen such an invention in any book, math software [name them !]
Up there, we would ask: what does it eat in winter ?
It is it a decoration from Dark Age "paper" ?
You can subscript a variable name, does not screw the bolt on the nut.

Jean ... can you show something for more Collabs Doctors ?


#5 Опубликовано: 07.03.2019 14:02:57
Martin Kraska

Martin Kraska

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

Группа: Moderator

I absolutely appreciate the importance of this feature for engineering documents. In a 100-page proof of strength you don't want to invent your own symbols if you want someone to comprehend your work.

I can't reproduce the issue with 6995:

if I write the document with komma as argument separator, I simply can't type a komma to the text index unless I go to special character mode using Ctrl-K. Names with such kommas survive. (german keyboard, win7)

Without using ctrl-K I just can type periods to separate individual text indices.

komma1.png
komma1.sm (2 КиБ) скачан 33 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
frapuano 07.03.2019 14:48:00
#6 Опубликовано: 07.03.2019 15:06:20
jfs

jfs

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

Группа: User

...
Do you mean you want to define X,:=1.23456789
I have never seen such an invention in any book, math software [name them !]
Up there, we would ask: what does it eat in winter ?
It is it a decoration from Dark Age "paper" ?
You can subscript a variable name, does not screw the bolt on the nut.

Jean ... can you show something for more Collabs Doctors ?




Jean,

Surely I have not been able to explain the interest of defining a variable in such a way. Enclosed is an excerpt of EN1992-1-1 (Eurocode 2 - Design of Concrete Structures), where you can find several cases where the variables have subscripts separated by commas. The interest would be to keep the original variable naming/definition so that it would be imediately reconizable by anyone familiar with the standard/subject (other piers, licencing authorities, clients, you name it).

In any case, thank you for your time.

JFSNF EN 1992-1-1_extract_variables.pdf (79 КиБ) скачан 47 раз(а).

#7 Опубликовано: 07.03.2019 15:19:31
Davide Carpi

Davide Carpi

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

Группа: Moderator

Directly, you can use only the decimal symbol in subscripts (whatever is the one set in your SMath Studio).

To add a generic symbol you can use CTRL+K or CTRL+SHIFT+K and switch to the special characters mode; this however isn't localization aware, thus if you share your document, something like the one below written for comma as arguments separator and period as decimal symbol, will stay in this way even for who has f.e. comma as decimal separator and semicolon as argument separator.

Screenshot from 2019-03-07 19-09-19.png

I think that following the path of special characters and fields, would be possible to introduce something like /./ and /,/ as serialized placeholders for localization-aware decimal symbol and argument separators inside strings; the way to input them obviously wouldn't be CTRL+K (because you might want an immutable comma/period) and neither direct typing (because argument separator is required to create new arguments inside functions).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
frapuano 07.03.2019 18:26:00
#8 Опубликовано: 07.03.2019 19:12:19
Jean Giraud

Jean Giraud

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

Группа: User

Few things you get from Alt+key much less Win 7 compared XP.
Apostrophe as good as coma. Not sure Smath would recognize
Latex [paper useless style as you want the math region be
executable as a math element.

Subscript.PNG
#9 Опубликовано: 08.03.2019 11:32:06
csb531

csb531

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

Группа: User

As an engineer I use the Eurocodes all the time. In Smath I always use the underscore "_" instead of the comma "," for the definition of variables, as shown above in the post of Jean:
Asw,max → Asw_max
because it is the easiest / fastest way of typing, without the risk of making fault formulas.
And I had never any complaints from anyone who checked or commented to my calculation reports for this way of typing.

Regards, csb
#10 Опубликовано: 08.03.2019 12:53:49
jfs

jfs

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

Группа: User

Dear ALL,

Thank you for your valuable contributions - very helpful. It is reassuring to know that one can count on your expertise and that there is always a way around on SMath.

Regards,
JFS
#11 Опубликовано: 08.03.2019 13:40:39
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

Asw,max → Asw_max


... just a bit pest in numerator vs apostrophe.
No recollection of such a demand in 15 years Mathcad.
No recollection Mathcad special characters can do.
ISO-5167 [Orifice Plate] is lot more maths,
but lot closer to executable maths, almost 1/1.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений