SMath Studio Forum
»
SMath Studio
»
Questions
»
How to display string element of the matrix in Smath Viewer?
 Rank: Newbie
Groups: Registered
Joined: 29/07/2014(UTC) Posts: 3  Location: Silesia
|
Hello, I have a question if it's possible to display the string part of a matrix in *.exe file created from a Smath file? Screenshot of issueTried the var2string function, but after changing the string value via exe file, it reads function argument name (a) instead of it's value. Is there some kind of workaround for this issue?
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 214  Was thanked: 75 time(s) in 46 post(s)
|
It would help if you post the original .sm file. I'm not exactly sure what you are trying to do. Are you trying to assign a value to a variable name defined in a? If so you can do something like this: https://en.smath.info/fo...eqautions.aspx#post36117As far as getting that dynamically created variable name to display on the left as an actual variable name, I'm not sure if that's possible. |
|
|
|
|
 Rank: Newbie
Groups: Registered
Joined: 29/07/2014(UTC) Posts: 3  Location: Silesia
|
In smath it's defined as:
a:="sample string"
a="sample string"
And if I change the string, sheet recalculates and shows a value as the new string. I wanted to achieve this functionality in smath viewer in exe file for creating additional info page on my docs, like project name and so on.
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 214  Was thanked: 75 time(s) in 46 post(s)
|
Make sure you hit enter/return key after entering value. Edit: You may have found a bug. This kind of functionality works great with numeric values but not with strings. I've tried with different optimizations as well to no avail. I'm not sure it's ever worked. I now SMath Viewer is still a work in progress so feel free to add bug entry. Edited by user 29 June 2018 17:39:14(UTC)
| Reason: Not specified |
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 14/10/2015(UTC) Posts: 258
Was thanked: 62 time(s) in 46 post(s)
|
Originally Posted by: barmin  Hello, I have a question if it's possible to display the string part of a matrix in *.exe file created from a Smath file? Screenshot of issueTried the var2string function, but after changing the string value via exe file, it reads function argument name (a) instead of it's value. Is there some kind of workaround for this issue? Hello Barmin The function you are looking for was previously available in previous versions of smath, such as version 5737. I do not know why they disabled it. Here I put an example in that version.  Test_string_5737.zip (360kb) downloaded 25 time(s).Best Regards Carlos
|
|
|
|
 Rank: Newbie
Groups: Registered
Joined: 29/07/2014(UTC) Posts: 3  Location: Silesia
|
Seems it's a bug then. Thanks for info.
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,647  Was thanked: 915 time(s) in 575 post(s)
|
|
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 214  Was thanked: 75 time(s) in 46 post(s)
|
Martin,
Once the Viewer is running try to change the value of Hallo and notice if it doesn't update in the second box.
|
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 14/10/2015(UTC) Posts: 258
Was thanked: 62 time(s) in 46 post(s)
|
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,647  Was thanked: 915 time(s) in 575 post(s)
|
For me it works. Yet I have to press enter to forward the changes in the input box. |
|
|
|
|
  Rank: Administration Groups: Registered, Administrators, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,735   Was thanked: 313 time(s) in 267 post(s)
|
For me it will change the numerical variable but not the string one (with return pressing, of course). before after  Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
How to display string element of the matrix in Smath Viewer?
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.