Great! This one works (with just renaming separator to delimiter; had also to replace *stream* upTo: $" with *line* upTo: $" in previous code) and improves reading time drastically: from many-many-many-many minutes to about 30 seconds! Thank you very much once again! :) 2011/11/18 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>
| row char line nextValue noValue | line := stream nextLine reading. row := OrderedCollection new. nextValue := (WideString new: 32) writing. noValue := true.
[[[(char := line get) isSeparator] whileTrue. noValue := false. char = $" ifTrue: [[nextValue write: (line ending: $") rest. (char := line get) = $"] whileTrue: [nextValue put: $"]. [char = separator] whileFalse: [char := line get]]. [char = separator] whileFalse: [nextValue put: char. char := line get]. row add: nextValue conclusion. nextValue := (WideString new: 32) writing] repeat] on: Incomplete do: [:exc | ].
noValue ifFalse: [row add: nextValue conclusion]. ^row
-- Dennis Schetinin