IsString() and user functions

IsString() and user functions - Сообщения

#1 Опубликовано: 07.07.2012 20:49:08
Davide Carpi

Davide Carpi

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

Группа: Moderator

Hi,

I found this bug defining user functions with IsString()

The issue disappear using IsString inside line()


regards,

w3b5urf3r
IsString (debug).PNG
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#2 Опубликовано: 09.07.2012 02:40:55
Stuart Bruff

Stuart Bruff

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

Группа: User

Wrote

Hi,

I found this bug defining user functions with IsString()

The issue disappear using IsString inside line()


regards,

w3b5urf3r




I'm not sure whether this is a bug or a delayed-evaluation 'feature' of using/not-using the program line. I raised a similar question about a month ago ...

Wrote

Hello,

How is the equality (ctl-=) operator supposed to work? I get ([1]=1)=1 but ([1])=2; the latter I expect, but I am surprised that a matrix is equal to a scalar, even though it is just a single element matrix.

Is there a way of programmatically distinguishing between a scalar and an array? I know there's no IsScalar or IsArray function. I've seen the workaround for using num2str & mat and I've written a function

IsArray(x):=
|n:=findstr(num2str(x),"mat" )
|n<>-1

(why doesn't IsArray(x):=findstr(num2str(x),"mat" )<>-1 work?)

, but this would appear to impose quite an evaluation overhead for large matrices. I was hoping to use x=stack(x) to check if x was an array, hence the purpose of my original question.

Stuart

#3 Опубликовано: 29.07.2012 14:55:10
Andrey Ivashov

Andrey Ivashov

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

Группа: Super Administrator

Thank you! Fixed.

Regards.
isString_fixed.png
2 пользователям понравился этот пост
Davide Carpi 29.07.2012 21:17:00, Radovan Omorjan 30.07.2012 03:04:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений