Page 1 of 1

@wcross error

Posted: Sat Oct 04, 2014 3:27 am
by nupogodi
@wcross returns an error message when parenthesis are involved and @winterleave results are incorrect

%x = "a b c "

string a = @winterleave("log( log( log(",%x)

%t = @wcross("""log(""", %x)
string b = @wcross(%t, """)""")

Re: @wcross error

Posted: Mon Oct 06, 2014 8:30 am
by EViews Gareth
We'll take a look.

Re: @wcross error

Posted: Mon Oct 06, 2014 3:03 pm
by EViews Gareth
@winterleave looks right to me.

@wcross error is a bug. It will be fixed next patch.

Re: @wcross error

Posted: Mon Oct 06, 2014 11:34 pm
by nupogodi
results of @winterleave are different depending on whether the parentheses are present or not - it is a bug. By the way, you could also fix the same bug in other string functions @wsort (wrong order of sorting), @wdelim (produces error message), @wsplit (produces error message)

%x = "a b c "
string a = @winterleave("log log log",%x)
string b = @winterleave("log( log( log(",%x)

'a equals: log a log b log c
'b equals: log( log( log( a "" b "" c

%x = "a b c log( x"
%y = "a, b, c, log("

string s1 = @wsort(%x, "D")
string s2 = @wdelim(%y, ",", "-")
svector s3 = @wsplit(%y, ",")

Re: @wcross error

Posted: Tue Oct 07, 2014 7:40 am
by EViews Gareth
That isn't a bug - all of the W functions treat open parens as part of a word.

"log( log( log(" is all one word. By design.