Variable definition using commas

Variable definition using commas - Example: VRd,max (VRd"comma"max) - 消息

#1 已发布: 2019/3/7 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 已发布: 2019/3/7 11:21:36
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: 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 已发布: 2019/3/7 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 已发布: 2019/3/7 13:36:29
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: 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 已发布: 2019/3/7 14:02:57
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: 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.44 KiB)已下载 1235 次。
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1位用户喜欢此帖子
frapuano 2019/3/7 14:48:00
#6 已发布: 2019/3/7 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.17 KiB)已下载 925 次。

#7 已发布: 2019/3/7 15:19:31
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: 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 2019/3/7 18:26:00
#8 已发布: 2019/3/7 19:12:19
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: 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 已发布: 2019/3/8 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 已发布: 2019/3/8 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 已发布: 2019/3/8 13:40:39
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: 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.
  • 有新帖
  • 无新帖