06-08-2010 01:34 PM
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.
The vi is attached, LV2009
06-08-2010 02:58 PM
All of these ideas will work (including mine ), 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.