Re: C String Prefix Operator Idea (Was: gfortran diagnostics and so on)



Dan Nagle wrote:
Hello,

Gary Scott wrote:
> glen herrmannsfeldt wrote:
>
>> jamesgiles@xxxxxxx wrote:

>>> So, string "literals" are not only *not* literal (meaning
>>> the same as their appearance) but aren't even compile-time
>>> constants anymore? And that's "a minor extension"?
>
> Fairly minor, you still have existing literals processed exactly as
> expected. Special processing only by application of special syntax.

I think control characters and graphic characters are rather different.
Graphic characters may be displayed via a single graphic in source text.
Control characters cannot. Being capable of being a part of source code
in a one-to-one way, seems to me to be fairly fundamental.

A general substitution procedure means to take one set of graphic
characters and replace them by another set of graphic characters
when they appear in a third set of graphic characters. That's rather
different from processing control characters.

Fortran doesn't handle control characters in any systematic way.
I think that's a shortcoming of Fortran, but I've lost that battle
every time I've tried to do something about it.

> I wasn't intending to limit to compile time only. This type of
> substitution already exists in many products I use. It is extremely
> useful. Yes, it would require some run-time support. Come on guys,
> show a little imagination.

A programmer may already use the c_<cc> (where <cc> names a control
character) constants. They may be used to insert the most frequently
used control characters into graphic strings as needed.

Defining a new category of character is a major undertaking,
it's not a matter of a lack of imagination. And a proposed syntax
doesn't change that. What, exactly, are the semantics to be supported
by the proposed syntax? That is, what, exactly are the semantics
of the new category of character?

Boy, I'm not sure why people are going so far off in the weeds. What I proposed does not alter existing fixed length strings or literals in any way.


--

Gary Scott
mailto:garylscott@sbcglobal dot net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

If you want to do the impossible, don't hire an expert because he knows it can't be done.

-- Henry Ford
.



Relevant Pages

  • Re: C String Prefix Operator Idea (Was: gfortran diagnostics and so on)
    ... Special processing only by application of special syntax. ... I think control characters and graphic characters are rather different. ... Graphic characters may be displayed via a single graphic in source text. ...
    (comp.lang.fortran)
  • Re: Test
    ... putting graphic characters in place of spaces ... then you can't complain about me, specifically, using Google Groups. ... Quote this with Google. ...
    (sci.math)
  • Re: whats the difference between LF(Line Fee) and NL (New line) ?
    ... these characters: LF, CR or NL. ... following graphic characters, that is, characters which cause something to ... The basic ASCII character set identifies a CR and an LF character and you ... will tend to find ASCII data streams perform formatting of a printed page ...
    (bit.listserv.ibm-main)
  • Re: antedeluvian Seagate
    ... The specs pages are horrible, ... using a custom font to display boxes and graphic characters. ...
    (uk.comp.sys.mac)
  • Re: =?ISO-8859-1?Q?Soup=E7on_of_cedilles_and_aper=E7us?=
    ... Note that most of these support only ASCII ... plus a few accented characters, ... Unicode supports, in principle, the characters of every written ... The catch is that not all newsreaders are new enough to ...
    (alt.usage.english)