Hi Lee, hi Marc'Antonio
thanks for your codes. Both are very powerful ideas which I will save for (maybe) later use.
But it seems that my question was not precise enough; the basic consideration was:
a) I have a text-based information which is connected with a "value"
b) The first part has a defined length, the second part can be concatenated with different parts and have a different length
c) This info has to be stored in a text-file
d) After reading from the text file the info has to be parsed again (in its different parts)
Because all info is text it could be a problem to define the "delimiter" between the "parts" - , : - _ / ; are not allowed as delimiter.
So the best thing would be to save it in a list: no problems with length, no problems with delimiters, ..
pseudo-Example of the INI-file:
[Definitions]
drilling=((modus . select) (Content ("this is an [important] text") ([LOGINNAME]) ("nice weather today, really {hot}") ({attdef.blockname}))
You see, the "Content" has a user-defined, free combination of standard text and different "dynamic values" which must be managed by the software ...
But the problem is: How to store this stuff in a text file and read it as list?
In the meantime I modified my code and try with delimiters
[Drilling]
modus=select
value= {SPEISUNG.RCS_OUTPUT_v01} ¶ {MELDUNG_NR..RCS_OUTPUT_v01} ¶
The idea is that delimiter " " (Alt+0160) and "¶" (Alt+0182) are strange enough that nobody would use them in a text.
But my code is not proved and not done now - if someone has a better idea than my delimiters or a solution for my list I would be happy to see it