drop in c

hi guys,

i want to do this using c(k.h):

q)x:til 5
q)-3_x
0 1

like so:

K x=ktn(KI,5);DO(5,xi=i);xn=2;

Q: is this going to break anything?

in short, i’m reading different length
strings into a KC list and i need to
trim the string to a given length.
i know the maximum, so i can
allocate the maximum and then
shorten. … if you get my drift.

it’s just the way the oracle call
interface works - you know that
a VARCHAR will be only so big
but you’re not told until the value
is fetched how long it is.

ta, jack.

yes, you could do that - maybe a little wasteful though if the real size is much less than the capacity.

Or you could create a 0 length char vector and append the chars.

but take care, it should be
DO(5,xI[i]=i)
? Attila