I'd like to have the ability to more easily parse a string into its component fields when any of the fields may be quoted. For example, if A$ contains:
1001,"Smith's, Inc.","123 First Street",Anytown,XX,"13579-2468","John Smith, Sr."
being able to parse that into what humans can interpret as 7 fields would be helpful. Perhaps adding another fileopt would do the trick; e.g.,
READ DATA FROM A$,key=# to iol=My_Data
where the key value is cumulative:
1 = Detect quotation marks (")
2 = Detect apostrophes (')
4 = Retain field quotes
If key=0 or not specified, it would operate as it does now.
E.g., with the data above, key=1 would return:
1001
Smith's, Inc.
123 First Street
Anytown
XX
13579-2468
John Smith, Sr.
whereas key=5 would return:
1001
"Smith's, Inc."
"123 First Street"
Anytown
XX
"13579-2468"
"John Smith, Sr."
key=3 or key=7 would allow for either a quote or apostrophe to identify the quoted field, and then look for the matching end-of-field character.
For key=1 or key=2 or key=3, any in-field double-characters would be reduced to single occurrences. Including the retain option (4) would also retain the doubled characters.