Is it possible to tell the compiler to not assign any special meaning to "String", so that a project can define its own?
I'm hoping at some point to look at a reference implementation for Tree Meta, an early (but powerful) compiler generation tool. I would, obviously, prefer to use FPC for this plus the Lazarus IDE, but I have four very specific requirements:
1) Be able to handle arbitrary character sets and codepages, but base strings on 8-bit characters unless specifically needed.
2) Be able to adapt to any text input file (including- gasp- EBCDIC if that's what the user wants).
3) Ensure that a string can be iterated like an array (i.e. UTF-8 is definitely out). Using "classical Pascal"- as described by many books from its heyday, and broadly similar to how C used to do it- is essential, since anything else will alienate readers who think it's obsolete.
4) As such, avoiding anything that smacks of "cleverness": specialist iterators, generics and so on.
I anticipate a "black box" similar to a StringList to encapsulate a file, with each string being based on either 8- or 16-but characters (32-bit is left as an exercise, but would probably be unlikely). Other than that, very "Turbo Pascal like" code.
MarkMLl