|
|
MichaelJF <mi-### [at] t-onlinede> wrote:
> for the first time I tried to use the read-directive and was heavily
> disappointed as I noticed that you can nearly write everything to a file, but
> are very restricted to read from a text-file. If one would have a directive like
> readln in c or c++ which reads a line from a file into a string one could build
> parsers only with the existing string-functions (o.k. some more convient ones
> would be fine, but the existing like strlen, strcmp or concat are enough to
> build macros for text exchanges, substring-detection and so on). So my question
> is simple: Is it possible to implent such a feature without too much effort?
#read was never intended to be a raw byte input stream. Instead, it was
always intended to be used to read comma-separated lists of elements.
(There's a lesser known fact that since #read uses the SDL parser itself
to read the numbers, you can actually embed things like #declares in the
input file and they will be parsed and interpreted properly and
transparently.)
--
- Warp
Post a reply to this message
|
|