SMath Studio Forum
»
SMath Studio
»
Questions
»
Variable definition using commas
Rank: Newbie
Groups: Registered
Joined: 07/03/2019(UTC) Posts: 4 Location: Porto
|
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
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: jfs 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.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 07/03/2019(UTC) Posts: 4 Location: Porto
|
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
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: jfs 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 ?
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,989 Was thanked: 1128 time(s) in 724 post(s)
|
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.sm (3kb) downloaded 19 time(s). |
|
1 user thanked mkraska for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 07/03/2019(UTC) Posts: 4 Location: Porto
|
... 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. JFS NF EN 1992-1-1_extract_variables.pdf (80kb) downloaded 16 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
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. 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). Edited by user 07 March 2019 21:38:20(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
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.
|
|
|
|
Rank: Member Groups: Registered
Joined: 10/10/2012(UTC) Posts: 24
|
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
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 07/03/2019(UTC) Posts: 4 Location: Porto
|
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
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: csb531 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.
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Variable definition using commas
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.