LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove the last line input into a string indicator??

I see the problem.  The old code would leave a newline character at the end of the output string.  Also, if the last line were repeated, the code would remove the last two lines.  Like:

123

456

456

The output would be:  123 with a newline at the end.

 

The old code was a mod to Broken Arrow's code.  This is my own.  It takes care of repeated last lines and does not leave a newline at the end.  Part of the code as marked by a box can be eliminted if the input does not have a newline at the end of the last line.

 

RemoveLastLine.png

 

The vi is attached, LV2009

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 11 of 12
(936 Views)

All of these ideas will work (including mine Smiley Wink), it just depends on what level of not-workingness you can live with in the known application.

 

The best idea, I think, is what VT93 said - make a string array and work with it like that. i have made lots of these recipe builder type front ends and the array will always work best in the end. What if the user wants to delete row 3 after making a 25-line "profile"? Easy with an array.

 

Richard






0 Kudos
Message 12 of 12
(916 Views)