LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

building array skipping some iteration results

Hi folks!
Sorry for the newbie question ~:-)
 
I am writing a subVI for processing a text file into a 2D table of Key/Values
I would like to write it in a blankline-tolerant way.
Well, if I sue iteration and auto-indexation the blank line are loaded into the table
as empty cells. I would like to skip these null values.
 
There is any trick to skip null values in autoindexation, or it is customary to use other ways.
In case, any hint?
 
Thanx!
 
::LabView 6.1::
0 Kudos
Message 1 of 3
(2,809 Views)
There is no trick, auto-index and array creation at the output
tunnel always work the same way. OTOH, you can store an array in a shift
register and then use append_to_array inside a case statement to switch out
the function when the input is null, but this tends to call malloc a lot
because the array keeps getting larger (LabVIEW does not know how much space
to allocate for the array before the loop starts). Also, if you are reading
the input file inside the loop, and for each call of the reader it is supposed
to return a key, you could make that vi adapt to null keys by having it get
another line.

Oh dear! If the reader ignores null lines and the last line is null then the output array will still have a null key, so it is not an ideal solution.

Message Edited by Odd_Modem on 12-23-2005 05:43 AM

0 Kudos
Message 2 of 3
(2,805 Views)
like this ?
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 3 of 3
(2,799 Views)