Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is it possible to read a line in a text file before or after a comma?
For example:
Line 1 will have: TEST1,TOS %%script(Q = (%ObjectTopLevel): If Q>0 then appendstring ("+" & (FormatNumber(Q,3))) else appendstring (FormatNumber(Q,3)))
But the list box will only show: TOS %%script(Q = (%ObjectTopLevel): If Q>0 then appendstring ("+" & (FormatNumber(Q,3))) else appendstring (FormatNumber(Q,3)))
My current code segment to read a file:
(setq LC nil)
(setq OpenFile (open (findfile "LabelContent.cfg")"R"))
(while (setq line (read-line OpenFile))
(setq LC (cons line LC))
);while
(setq LC (reverse LC))
(close OpenFile)
(dcl-ListBox-AddList LabelContent/Form1/ListBox1 LC)
Solved! Go to Solution.