Quote:
>I have to convert a string to an array of word. Means, each two
>byte in the string represents an signed integer. I do use a loop
>counting up an offset. In each loop the offset is incremented by 2.
>Then I use the two bytes at the marked position and put them
>together to a word with the low and high-byte function. This loop
>is rearly slow, when converting 10000 values or more.
>Has anybody am idea how to do this faster.
You should find this to be a lot faster:
Take your string and wire it into the input of a type cast function (on the
Advanced-Data Manipulation palette). Create an array constant and place a
numeric constant inside of it. Set the representation on the numeric to be
I16. What comes out of the other end of that type cast is an array of I16's
and it should happen almost immediately.
Enjoy.
Jason