4 Replies Latest reply: Oct 20, 2013 11:28 AM by Antoine Frangieh

# Does QlikView handle the equivalent of struct in C ?

Hi,

Does anyone know if we can call upon C language within Qlikview?

Thanks,

Antoine

• ###### Re: Does QlikView handle the equivalent of struct in C ?

I don't think so. But what do you want to achieve? Probably there is a "QlikView way" to do this.

A table with its fields might not be so much different.

• ###### Re: Does QlikView handle the equivalent of struct in C ?

Thanks Stefan.

My intent is to work with vectors within QV. (Assuming that k is 0 to simplify)

I have started by declaring the function Magnitude

SET f.v.Magnitude=

if(

len(\$1)>0 and len(\$2)>0

,sqrt(sqr(\$1)+sqr(\$2))

,'Rejected'

)

;

Then the function Angle

SET f.v.Angle=

if(

len(\$1)>0 and len(\$2)>0 and \$1<>0

,atan(\$2/\$1)

,'Rejected'

)

;

then I load the i, j, k magnitudes:

[0]:

\$(f.v.Magnitude(i, j)) as Magnitude

;

j,

k,

\$(f.v.Angle(i, j)) as Angle

FROM

[vector representation v1 - coordinates.xlsx]

(ooxml, embedded labels, table is Sheet1);

Note that for an obscure reason, the same script won't work if I load it like this:

[0]:

\$(f.v.Magnitude(i, j)) as Magnitude,

\$(f.v.Angle(i, j)) as Angle

;

i,

j,

k

FROM

[vector representation v1 - coordinates.xlsx]

(ooxml, embedded labels, table is Sheet1);

Thanks,

Antoine

• ###### Re: Re: Does QlikView handle the equivalent of struct in C ?

I am not sure if I understood your issue. But your both sections of code works fine with my inline data. PFA

• ###### Re: Does QlikView handle the equivalent of struct in C ?

Thanks, now it works. must have written something wrong in my initial attempt. weird.