String function in user function

String function in user function - Messages

#1 Posted: 7/1/1980 10:31:40 AM
Edward Ulle

Edward Ulle

20 likes in 182 posts.

Group: Moderator

I tried from my computer at work to enter a string in SMath Live and could not. When ever I type " the unit cursor appears.
Ed
#2 Posted: 12/7/2011 7:41:32 PM
Edward Ulle

Edward Ulle

20 likes in 182 posts.

Group: Moderator

It appears string functions findstr and subst don't work in user functions, maybe others. Probably because when the function is created the parameter is null not a string. The string functions must test for a string.


Ed
#3 Posted: 12/8/2011 5:36:53 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello Ed,

Quite strange, but this will work as a workaround.

[LIVE width=305 height=338]http://smath.info/live/?file=3340[/LIVE]

Actually, it seems that line() is needed in order to use string functions>

[LIVE width=311 height=203]http://smath.info/live/?file=3342[/LIVE]

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#4 Posted: 12/8/2011 6:18:06 PM
Edward Ulle

Edward Ulle

20 likes in 182 posts.

Group: Moderator

Radovan,

I'm using 0.89 Stable and I tried to duplicate your example and get the same error message. Thanks.
Ed
#5 Posted: 12/10/2011 9:17:42 AM
Edward Ulle

Edward Ulle

20 likes in 182 posts.

Group: Moderator

Still fiddling with this I can't find a string function that will work in a user function. Using 0.89 Stable on Win 7.



PS

Something else weird. In SMath Live when I type double quote I get units cursor. I can't enter strings in SMath Live. Radovan, how did you do it?
Ed
#6 Posted: 12/10/2011 1:06:41 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello Ed,
Wrote

Still fiddling with this I can't find a string function that will work in a user function. Using 0.89 Stable on Win 7.


Do not know about this. It might be a bug. My advice is to use the 0.89.8 until the release of the next version.
Wrote

Something else weird. In SMath Live when I type double quote I get units cursor. I can't enter strings in SMath Live. Radovan, how did you do it?


I do not have problems with it. When I insert double quotes there can be string inserted. On the other way, it might be faster to make a *.sm file first and then to use "Upload page (.sm)" from the SMath Studio Live palette.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 users liked this post
Edward Ulle 12/10/2011 3:16:00 PM
  • New Posts New Posts
  • No New Posts No New Posts