Maurice Lombardi wrote:
What about command line defines, as
gpc -DPostScript ...
would it be case sensitive ? I would prefer no, but is there any problem ?
Oh right. I forgot to mention them, it's good you did...
Well, I think the implicit defines (`__GPC__', `__FOO_PASCAL__', `DJGPP', etc.) should remain case-sensitive.
For user-supplied options, we have the choice. Again, I see reasons to have case-sensitive ones, too. E.g., I have some programs which work alternatively with GMP (multi-presicion) or normal numbers, and I use `-DGMP' to select the GMP version. Since the unit is also called `GMP', it would conflict if it's case-insensitive (whereas now I can write `uses Gmp' to avoid a conflict).
So, we could allow both on the command-line as well, we'd just need different option names.
The problem is that `--define' in GCC is equivalent to `-D' and case-sensitive, and I think we shouldn't change this to keep interoperability with GCC as good as it is now. But we could add a new option for case-insensitive defines.
J. David Bryan wrote:
OTOH, something like {$define-case-sensitive} would make it clear, but it's very long.
{$define-cs} would be OK (better than {$definecs} only because the "cs" part stands out better with the hyphen).
I'd vote against the hyphen because it's an acronym that follows. BTW, since the directive itself is case-insensitive, you could write it as {$DefineCS} to make it clearer...
Dr A Olowofoyeku wrote:
On 7 Apr 00, at 0:53, Peter Gerwinski wrote:
Dr A Olowofoyeku wrote:
Why not use {$define} for case insensitive and #define for case sensitive ? Since case-sensitivity is a C thing, we might as well keep #define (which is also a C thing) for that purpose. Advantage? It avoids the introduction of new constructs.
I see the advantages. But in fact we want to get rid of unpascalish things such as #define and promote alternatives like {$define}.
I see. In this case I vote for {$csdefine} ('Case Sensitive Define') or {$cdefine}.
With the above consideration about the command line, I suggest perhaps `csdefine' and `cidefine' for case-sensitive/-insensitive defines. Both would work on the command-line and as compiler directives. Besides, `define' as a directive is case-insensitive (because of BP) and `--define' on the command line is case-sensitive (because of GCC).
Or the same with `definecs', `defineci'.
Frank
J. David Bryan wrote:
On 7 Apr 2000, at 15:39, Frank Heckenbach wrote:
I'd vote against the hyphen because it's an acronym that follows.
Then why do we have options named "--lazy-io" and "--debug-gpi"? :-)
I implemented them without asking Frank. ;-)
Anyway, `--lazy-io' is obsolete; `--debug-gpi' almost. (Since the GPI format changed since I implemented that option, there are now better approaches to debug problems with GPI files.)
Peter
10-Apr-00 23:56 you wrote:
On 7 Apr 2000, at 15:39, Frank Heckenbach wrote:
I'd vote against the hyphen because it's an acronym that follows.
Then why do we have options named "--lazy-io" and "--debug-gpi"? :-)
Is it possible to use them as {$lazy-io } or {$debug-gpi } ? Not, AFAIK. Options and preprocessor directives are different beasts. We are talking about BOTH here.
Khimenko Victor wrote:
Then why do we have options named "--lazy-io" and "--debug-gpi"? :-)
Is it possible to use them as {$lazy-io } or {$debug-gpi } ? Not, AFAIK.
--lazy-io has been removed in December 1998.
It is possible to use {$debug-gpi} as a directive - as it is for most long options.
Options and preprocessor directives are different beasts. We are talking about BOTH here.
In fact most options can be given as directives. Exceptions are those that carry path names and other site-specific information which does not belong into the source code of a program.
Back to the subject, I think that the aestetic of dashes and acronyms depends on the use of the acronyms. When it is used only in this single situation ("ci", "cs") then the dash looks strange. In contrast when the acronym is used at many other places and is therefore known to the user like a separate word ("io", "gpi"), then I have no problems separating it with a dash.
Voting for "cidefine" and "csdefine",
Peter