In particular, use each of these symbols at least once in your source code:
! " # $ % & ' () * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~
Symbols inside comments, string literals, regexps (or any other kinds of literals etc.) don't count (but their delimiters such as /**/
or ""
do count).
The program should not perform any action. It just has to compile and do nothing when run.
If for some reason some of the symbols cannot be used in the language of your choice, explain that rigorously (what and why must be excluded).
Update: A few answers used symbols withing regular expressions. I'd consider this a bit problematic, it's the same thing as putting them into string literals or comments (that's why I put etc. in that requirement). Please try without this. I also updated the requirement above.
Update: Shortest code wins (tagged as code-golf). As suggested, we'll most likely need some tie-breaker criteria. I suggest that if there is a tie, the winning one is the one in which the ASCII symbols appear as much ordered as possible. Formally: Filter out the first occurrence of each of the listed symbols from a program. This will result in a permutation on the listed symbols. The program with less inversion number of its permutation wins.
Update: I'd be happy to see some/more solutions in regular/mainstream languages, such as C(++), Java, Scala, Haskell, etc.
@%
nor the backtick can appear in c except as part of a literal (in sufficiently new versions of c%
can appear in digraphs). (and#
only appears in preprocessor directives, but we'll just have to live with that)? That is, I'm asking for Matt's approach to be made explicitly legal. \$\endgroup\$#
,@
, and ` are not legal outside of any sort of literal \$\endgroup\$