Topic: Trigraph Sequences??
Author: "Mull" <dotps@mbox4.singnet.com.sg>
Date: 1997/09/15 Raw View
Hi!
I was going thru the C++ Draft -dated 2nd Dec 1996.
What is the use of trigraph sequences in C++??
One example says that ??= translates to # so that
??=define will translate to #define.
But, where and when is it used??
Can someone give a more detailed explanation??
Rgds,
Mull.
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: "Ron Ruble" <raffles1@worldnet.att.net>
Date: 1997/09/15 Raw View
Trigraph sequences are used in foreign language environments when the
keyboard does not have keys for the required characters.
They provide an alternative key combination to produce the same result.
--
Ron Ruble
Raffles Software Development Inc.
Mull wrote in article <01bcc109$43a22ee0$7acb15a5@default>...
>Hi!
>
>I was going thru the C++ Draft -dated 2nd Dec 1996.
>What is the use of trigraph sequences in C++??
>One example says that ??= translates to # so that
>??=define will translate to #define.
>
>But, where and when is it used??
>Can someone give a more detailed explanation??
>
>Rgds,
>Mull.
>---
>[ comp.std.c++ is moderated. To submit articles: try just posting
]
>[ your news-reader. If that fails, use
td-c++@ncar.ucar.edu ]
>[ FAQ:
http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
>[ Policy:
http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
>[ Comments?
ucar.edu ]
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: Frederic LACHASSE <lachass@worldnet.fr>
Date: 1997/09/15 Raw View
"Mull" <dotps@mbox4.singnet.com.sg> wrote:
> I was going thru the C++ Draft -dated 2nd Dec 1996.
> What is the use of trigraph sequences in C++??
> One example says that ??= translates to # so that
> ??=define will translate to #define.
>
> But, where and when is it used??
> Can someone give a more detailed explanation??
It came from some environemnts where it may be difficult to type the {}#[]
symbols which are not used in most programming language (assembler, FORTRAN,
COBOL, PL/1, RPG, BASIC, LISP...) but mandatory in C/C++ programming.
Such environments include foreign countries that prefers replacing these symbols
by country specific ones like accented characters and local monetary sign (this
can happen on the keyboard terminal and sometimes, in 7 bits environment, in the
system character table), or even systems where they're not available on US
keyboard.
On such systems, either you don't use C/C++ or you must use trigraphs. For this
reason, and for portability of applications made on these systems, all C/C++
compiler must handle trigraphs.
Frederic LACHASSE (ECP 86)
Internet mailto:lachass@worldnet.fr
CompuServe: 100530,2005
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Author: rbridges@cix.compulink.co.uk ("Robert Bridges")
Date: 1997/09/17 Raw View
> Hi!
>
> I was going thru the C++ Draft -dated 2nd Dec 1996.
> What is the use of trigraph sequences in C++??
> One example says that ??= translates to # so that
> ??=define will translate to #define.
>
> But, where and when is it used??
> Can someone give a more detailed explanation??
>
> Rgds,
> Mull.
Trigraph sequences allow you to write C in environments that do not
support ASCII. They are comprised of characters from the ISO Invariant
code set. For example EBCDIC on various mainframes, doesn't have }{, etc
BobB
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: jcoffin@taeus.com (Jerry Coffin)
Date: 1997/09/17 Raw View
In article <01bcc109$43a22ee0$7acb15a5@default>,
dotps@mbox4.singnet.com.sg says...
> Hi!
>
> I was going thru the C++ Draft -dated 2nd Dec 1996.
> What is the use of trigraph sequences in C++??
> One example says that ??= translates to # so that
> ??=define will translate to #define.
It's useful primarily (if not exclusively) with some equipment that uses
a different character set than ASCII, and doesn't include a method of
creating characters such as `#" directly. As it happens, there's an ISO
standard for a character set that's missing some of C and C++'s standard
symbols, and the C committee apparently felt obliged to make C compatible
with it. Though there are strong arguments that trigraphs are
exceptionally ugly, clumsy and difficult to read, C++ maintained
compatibility with them anyway, though it adds digraphs which, at least
to me, seem somewhat less crufty.
--
Later,
Jerry.
The universe is a figment of its own imagination.
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]