6
Based on the question of graphs, what are digraphs?
- Why were they created?
- What are the sequences?
- Current compilers still allow you to use them?
6
Based on the question of graphs, what are digraphs?
6
I wish you hadn’t asked :P
The early days of computers had difficulties entering certain types of characters, so these sequences of characters were created to represent another one that really should have been "typed" there. Something similar to what is done with Unicode nowadays in certain situations where it is not possible to easily enter the character.
According to the Wikipedia would be these sequences:
<: -> [
:> -> ]
<% -> {
%> -> }
%: -> #
Graphers
??= -> #
??/ -> \
??' -> ^
??( -> [
??) -> ]
??! -> |
??< -> {
??> -> }
??- -> ~
In general compilers allow. O C++ wants to take this out of the specification (I think you already took).
Better not use, there’s no reason for it nowadays. There’s a example here.
Browser other questions tagged c c++ terminology syntax
You are not signed in. Login or sign up in order to post.
The first ones look like emoticons' grandparents :)
– bfavaretto
Add an example @bigown, so I’ll mark it as a response.
– Laerte
@Laertes for what? No need :)
– Maniero
In this contest the staff surpasses themselves: The International Obfuscated C Code Contest
– Laerte