String function in user function

String function in user function - Сообщения

#1 Опубликовано: 01.07.1980 10:31:40
Edward Ulle

Edward Ulle

20 сообщений из 182 понравились пользователям.

Группа: 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 Опубликовано: 07.12.2011 19:41:32
Edward Ulle

Edward Ulle

20 сообщений из 182 понравились пользователям.

Группа: 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 Опубликовано: 08.12.2011 05:36:53
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: 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 Опубликовано: 08.12.2011 18:18:06
Edward Ulle

Edward Ulle

20 сообщений из 182 понравились пользователям.

Группа: Moderator

Radovan,

I'm using 0.89 Stable and I tried to duplicate your example and get the same error message. Thanks.
Ed
#5 Опубликовано: 10.12.2011 09:17:42
Edward Ulle

Edward Ulle

20 сообщений из 182 понравились пользователям.

Группа: 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 Опубликовано: 10.12.2011 13:06:41
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Edward Ulle 10.12.2011 15:16:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений