Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline dg1727  
#1 Posted : 15 May 2010 07:48:22(UTC)
dg1727


Rank: Member

Groups: Registered
Joined: 11/05/2010(UTC)
Posts: 15
Man

Hello,

Using a variable name with a space character (which is entered by pressing the _ underscore key), I got an error:



Notice that the tooltip mentions variable "D" instead of "D t". If I remove the space from all instances of the variable name "D t", then P is correctly shown as 3.3333

If I have left more steps in the SMath worksheet than the minimum it takes to show the problem, please bear with me - I based the example on something I was doing for my job.

Here is the .sm file.

Of course, I can keep spaces out of my variable names for now, but maybe something can be changed in future versions of SMath Studio to allow variables to be evaluated that depend on other variables that have spaces in their names.

I wonder if a possible solution would include keeping underscore keypresses as underscore characters in variable names. This is really a separate feature request, but it is related closely enough that I thought it was OK to put in the same forum posting.

Thanks in advance for comment.

Edited by user 15 May 2010 22:24:25(UTC)  | Reason: Moved picture & attachment from 3rd-party hosting services to wiki

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 15 May 2010 13:19:16(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello,
dg1727 wrote:
I wonder if a possible solution would include keeping underscore keypresses as underscore characters in variable names. This is really a separate feature request, but it is related closely enough that I thought it was OK to put in the same forum posting.

I think that using underscore producing white space should be avoided at the moment. Some other people reported the same thing. However, there are other more exotic characters you can use into a variable name. Underscore as a regular character in the variable name might be useful, but I think there are some restrictions due to the internal SMath working. Andrey might give you a more precise answer.

Regards,
Radovan

EDIT: BTW, see please how the undefined D t variable made a mess into your worksheet:

If the D t variable have had a numerical value before its using, it would not be such a problem:

Also, if you just try to copy D t variable or a part of the region where such a variable exists, you will again make a mess (the characters will be overlapped)

Edited by user 15 May 2010 14:45:57(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline dg1727  
#3 Posted : 15 May 2010 23:23:14(UTC)
dg1727


Rank: Member

Groups: Registered
Joined: 11/05/2010(UTC)
Posts: 15
Man

omorr wrote:
see please how the undefined D t variable made a mess into your worksheet:

If the D t variable have had a numerical value before its using, it would not be such a problem:

Also, if you just try to copy D t variable or a part of the region where such a variable exists, you will again make a mess (the characters will be overlapped)


I made this sample worksheet in an attempt to have multiple scenarios on the same worksheet, as discussed in the hints about user functions section of the Wiki. This requires defining a variable or function before the variables on which it depends ('D_t' in my example, 'a' in the Wiki example) are defined.

So I think the 2 display issues you mention in the quote above may need to be fixed in SMath Studio.

Edited by user 26 May 2010 14:14:15(UTC)  | Reason: Fixed out-of-date link to the Wiki

Offline Andrey Ivashov  
#4 Posted : 22 June 2010 03:57:37(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Fixed. "_" char can be now used into the math expressions. Fix will be available with a new version of SMath Studio. For now, you can test calculation using SMath Studio Live.

See also Crashes.
Offline omorr  
#5 Posted : 22 June 2010 11:08:34(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Andrey,

It seems, "_" will produce a space in the variable name but the underscore in the defined function name.

Open in SMath Cloud

Should it be this way?
On the other hand, I do not know how to copy a region in "Live" mode (I think this is not possible - not sure) in order to see if the underscore would make a mess in the copied math region.

Regards,
Radovan

Edited by user 22 June 2010 11:48:26(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Andrey Ivashov  
#6 Posted : 22 June 2010 13:53:46(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Hello.

omorr wrote:
It seems, "_" will produce a space in the variable name but the underscore in the defined function name.
...
Should it be this way?

Good question Good What do you thing about this? Should the "_" symbol be invisible in variables and functions or not? Fact is that behavior of underscore character should be the same in both cases.

omorr wrote:
On the other hand, I do not know how to copy a region in "Live" mode (I think this is not possible - not sure) in order to see if the underscore would make a mess in the copied math region.

Copying works now too with a latest builds of standalone SMath Studio versions. And you're right - there is no clipboard in Live version yet.

Best regards.
Offline omorr  
#7 Posted : 22 June 2010 14:10:38(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Andrey,
omorr wrote:
It seems, "_" will produce a space in the variable name but the underscore in the defined function name.
...
Should it be this way?

smath wrote:

Good question Good What do you thing about this? Should the "_" symbol be invisible in variables and functions or not? Fact is that behavior of underscore character should be the same in both cases.

I think the underscore should be visible in either cases. Spaces might make a confusion. We are used to look at spaces as omitted product between two variables. I do not know what other users think.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Andrey Ivashov  
#8 Posted : 22 June 2010 14:29:13(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Thanks for the answer. Agree with you. If no one will show the reason of why "_" char should not be displayed I will change it.

Regards.
Users browsing this topic
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.