<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-menu-disabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 skin-theme-clientpref-os vector-feature-navigation-update-disabled vector-sticky-header-enabled skin-thumbsize-clientpref-standard" lang="it" dir="ltr"><head>
    <meta charset="UTF-8">
    <title>Iso646.h</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/png" href="./_res_/favicon.png">
    <link rel="canonical" href="https://it.wikipedia.org/wiki/Iso646.h"> <link href="./_mw_/ext.cite.parsoid.styles.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/ext.cite.styles.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/mediawiki.skinning.content.parsoid.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
    <link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
    <meta name="ResourceLoaderDynamicStyles" content="">
    
    <link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
    <link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
    <link rel="stylesheet" type="text/css" href="./_res_/footer.css">
    <link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
  </head>
  <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Iso646_h rootpage-Iso646_h skin-vector-2022 action-view">
    <div class="mw-page-container">
      <div class="mw-page-container-inner">
        <div class="mw-content-container">
          <main id="content" class="mw-body">
            <header class="mw-body-header vector-page-titlebar">
              <h1 id="firstHeading" class="firstHeading mw-first-heading">iso646.h</h1>
            </header>
            <a id="top"></a>
            <div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
              <div id="contentSub">
                <div id="mw-content-subtitle"></div>
              </div>
              <div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="it" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="it" dir="ltr" data-mw-parsoid-version="0.24.0.0-alpha15" data-mw-html-version="2.8.0"><section data-mw-section-id="0" id="mwAQ">
<span typeof="mw:Transclusion" id="mwAw"></span>
<p id="mwBA"><b id="mwBQ">iso646.h</b> è l'<a rel="mw:WikiLink" href="Header_file" title="Header file" class="mw-redirect" id="mwBg">header file</a> della <a rel="mw:WikiLink" href="Libreria_standard_del_C" title="Libreria standard del C" id="mwBw">libreria standard del C</a> che definisce alcune <a rel="mw:WikiLink" href="Macro_(informatica)" title="Macro (informatica)" id="mwCA">macro</a> relative agli <a rel="mw:WikiLink" href="Operatore_(informatica)" title="Operatore (informatica)" id="mwCQ">operatori</a> bitwise e logici.</p>

<p id="mwCg">Sono un set di token alternativi che consentono di scrivere in modo diverso alcuni operatori comuni del <a rel="mw:WikiLink" href="Linguaggio_di_programmazione" title="Linguaggio di programmazione" id="mwCw">linguaggio di programmazione</a> <a rel="mw:WikiLink" href="C_(linguaggio)" title="C (linguaggio)" class="mw-redirect" id="mwDA">C</a>. Permettono inoltre ai programmatori di usare gli operatori bitwise e logici i quali potrebbero altrimenti essere difficili da digitare su alcune <a rel="mw:WikiLink" href="Tastiera_(informatica)" title="Tastiera (informatica)" id="mwDg">tastiere</a> internazionali oppure non-<a rel="mw:WikiLink" href="QWERTY" title="QWERTY" id="mwDw">QWERTY</a>.</p>

<p id="mwEA">Questi token sono stati creati da <a rel="mw:WikiLink" href="Bjarne_Stroustrup" title="Bjarne Stroustrup" id="mwEQ">Bjarne Stroustrup</a> nella bozza dello standard del <a rel="mw:WikiLink" href="C%2B%2B" title="C++" id="mwEg">linguaggio C++</a><sup class="mw-ref reference" id="cite_ref-Grill_the_Committee_2018_1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-Grill_the_Committee_2018-1" id="mwEw"><span class="mw-reflink-text" id="mwFA"><span class="cite-bracket" id="mwFQ">[</span>1<span class="cite-bracket" id="mwFg">]</span></span></a></sup> e poi sono stati aggiunti definitivamente in un emendamento allo standard C90 del <a rel="mw:WikiLink" href="1995" title="1995" id="mwGA">1995</a> tramite libreria per evitare di corrompere il codice già scritto.</p>

<p id="mwGQ">Il nome dell'header, in cui sono implementati, si riferisce allo standard <a rel="mw:WikiLink" href="ISO/IEC_646" title="ISO/IEC 646" id="mwGg">ISO/IEC 646</a>, un set di caratteri a 7 bit con un numero di variazioni regionali, dove alcuni di essi hanno caratteri accentati al posto dei segni di punteggiatura utilizzati dagli operatori del linguaggio C.</p>

</section><section data-mw-section-id="1" id="mwHA" aria-labelledby="Le_macro"><div class="mw-heading mw-heading2"><h2 id="Le_macro">Le macro</h2></div>
<p id="mwHQ">Sono definite le seguenti 11 macro:<sup class="mw-ref reference" id="cite_ref-Rationale_2003_C_2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-Rationale_2003_C-2" id="mwHg"><span class="mw-reflink-text" id="mwHw"><span class="cite-bracket" id="mwIA">[</span>2<span class="cite-bracket" id="mwIQ">]</span></span></a></sup></p>
<table class="wikitable" style="text-align:center" id="mwIg">
<tbody id="mwIw"><tr bgcolor="#e9e9e9" id="mwJA">
<th style="padding-left:1em;padding-right:1em" id="mwJQ">Macro</th>
<th id="mwJg">Definita come</th></tr>
<tr id="mwJw">
<td id="mwKA"><code id="mwKQ">and</code></td><td id="mwKg"><code id="mwKw">&amp;&amp;</code></td></tr>
<tr id="mwLA">
<td id="mwLQ"><code id="mwLg">and_eq</code></td><td id="mwLw"><code id="mwMA">&amp;=</code></td></tr>
<tr id="mwMQ">
<td id="mwMg"><code id="mwMw">bitand</code></td><td id="mwNA"><code id="mwNQ">&amp;</code></td></tr>
<tr id="mwNg">
<td id="mwNw"><code id="mwOA">bitor</code></td><td id="mwOQ"><code id="mwOg"><span typeof="mw:Nowiki" id="mwOw">|</span></code></td></tr>
<tr id="mwPA">
<td id="mwPQ"><code id="mwPg">compl</code></td><td id="mwPw"><code id="mwQA">~</code></td></tr>
<tr id="mwQQ">
<td id="mwQg"><code id="mwQw">not</code></td><td id="mwRA"><code id="mwRQ"><span typeof="mw:Nowiki" id="mwRg">!</span></code></td></tr>
<tr id="mwRw">
<td id="mwSA"><code id="mwSQ">not_eq</code></td><td id="mwSg"><code id="mwSw"><span typeof="mw:Nowiki" id="mwTA">!=</span></code></td></tr>
<tr id="mwTQ">
<td id="mwTg"><code id="mwTw">or</code></td><td id="mwUA"><code id="mwUQ"><span typeof="mw:Nowiki" id="mwUg">||</span></code></td></tr>
<tr id="mwUw">
<td id="mwVA"><code id="mwVQ">or_eq</code></td><td id="mwVg"><code id="mwVw"><span typeof="mw:Nowiki" id="mwWA">|</span>=</code></td></tr>
<tr id="mwWQ">
<td id="mwWg"><code id="mwWw">xor</code></td><td id="mwXA"><code id="mwXQ">^</code></td></tr>
<tr id="mwXg">
<td id="mwXw"><code id="mwYA">xor_eq</code></td><td id="mwYQ"><code id="mwYg">^=</code></td></tr>
</tbody></table>

</section><section data-mw-section-id="2" id="mwYw" aria-labelledby="C++"><div class="mw-heading mw-heading2"><h2 id="C++"><span id="C.2B.2B" typeof="mw:FallbackId"></span>C++</h2></div>
<p id="mwZA">Gli identificatori sopramenzionati sono operator keywords, nel <a rel="mw:WikiLink" href="C%2B%2B" title="C++" id="mwZg">linguaggio di programmazione ISO C++</a> non richiedono l'inclusione del file header.<sup class="mw-ref reference" id="cite_ref-Stroustrup_1994_DEC_3-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-Stroustrup_1994_DEC-3" id="mwZw"><span class="mw-reflink-text" id="mwaA"><span class="cite-bracket" id="mwaQ">[</span>3<span class="cite-bracket" id="mwag">]</span></span></a></sup> Per coerenza, lo standard <a rel="mw:WikiLink" href="C%2B%2B98" title="C++98" id="mwaw">C++98</a> fornisce l'header <code id="mwbA"><span typeof="mw:Entity" id="mwbQ">&lt;</span>ciso646<span typeof="mw:Entity" id="mwbg">&gt;</span></code>, anche se quest'ultimo non ha effetti, essendo vuoto.<sup class="mw-ref reference" id="cite_ref-4" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-4" id="mwbw"><span class="mw-reflink-text" id="mwcA"><span class="cite-bracket" id="mwcQ">[</span>4<span class="cite-bracket" id="mwcg">]</span></span></a></sup> Alcuni compilatori, come <a rel="mw:WikiLink" href="Microsoft_Visual_C%2B%2B" title="Microsoft Visual C++" id="mwcw">Microsoft Visual C++</a> hanno, almeno in passato, richiesto che tale header venisse incluso per poter utilizzare questi identificatori.</p>

</section><section data-mw-section-id="3" id="mwdA" aria-labelledby="Note"><div class="mw-heading mw-heading2"><h2 id="Note">Note</h2></div>
<div class="mw-references-wrap" typeof="mw:Extension/references" id="mwdQ"><ol class="mw-references references" id="mwdg"><li id="cite_note-Grill_the_Committee_2018-1" data-mw-footnote-number="1"><span class="mw-cite-backlink" id="mwdw"><a href="#cite_ref-Grill_the_Committee_2018_1-0" rel="mw:referencedBy" id="mweA"><span class="mw-linkback-text" id="mweQ">↑</span></a></span> <span id="mw-reference-text-cite_note-Grill_the_Committee_2018-1" class="mw-reference-text reference-text"><cite class="citation web" style="font-style:normal" typeof="mw:Transclusion" id="mweg">(<span style="font-weight:bolder; font-size:80%" id="mwew"><abbr title="inglese" id="mwfA">EN</abbr></span>) <a rel="mw:ExtLink nofollow" href="https://www.youtube.com/watch?v=JYG5LFHkUuE&amp;t=4582" class="external text" id="mwfQ"><span style="font-style:italic;" id="mwfg">CppCon 2017: Panel “Grill the Committee”</span></a>, su <span style="font-style:italic;" id="mwfw">youtube.com</span>.</cite></span></li>
<li id="cite_note-Rationale_2003_C-2" data-mw-footnote-number="2"><span class="mw-cite-backlink" id="mwgA"><a href="#cite_ref-Rationale_2003_C_2-0" rel="mw:referencedBy" id="mwgQ"><span class="mw-linkback-text" id="mwgg">↑</span></a></span> <span id="mw-reference-text-cite_note-Rationale_2003_C-2" class="mw-reference-text reference-text"><cite class="citation web" style="font-style:normal" typeof="mw:Transclusion" id="mwgw">(<span style="font-weight:bolder; font-size:80%" id="mwhA"><abbr title="inglese" id="mwhQ">EN</abbr></span>) <a rel="mw:ExtLink nofollow" href="http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf" class="external text" id="mwhg"><span style="font-style:italic;" id="mwhw">Rationale for International Standard - Programming Languages - C</span></a> (<span style="font-weight: bolder; font-size:80%" id="mwiA"><abbr title="documento in formato PDF" id="mwiQ">PDF</abbr></span>), su <span style="font-style:italic;" id="mwig">open-std.org</span>, Aprile 2003. <small id="mwiw">URL consultato il 17 ottobre 2010</small> <small id="mwjA">(<a rel="mw:ExtLink nofollow" href="https://web.archive.org/web/20160606072228/http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf" class="external text" id="mwjQ">archiviato</a> il 6 giugno 2016)</small>.</cite></span></li>
<li id="cite_note-Stroustrup_1994_DEC-3" data-mw-footnote-number="3"><span class="mw-cite-backlink" id="mwjg"><a href="#cite_ref-Stroustrup_1994_DEC_3-0" rel="mw:referencedBy" id="mwjw"><span class="mw-linkback-text" id="mwkA">↑</span></a></span> <span id="mw-reference-text-cite_note-Stroustrup_1994_DEC-3" class="mw-reference-text reference-text"><cite class="citation libro" style="font-style:normal" typeof="mw:Transclusion" id="mwkQ"><a rel="mw:WikiLink" href="Bjarne_Stroustrup" title="Bjarne Stroustrup" id="mwkg">Bjarne Stroustrup</a>, <a rel="mw:ExtLink nofollow" href="https://archive.org/details/designevolutiono0000stro" class="external text" id="mwkw"><span style="font-style:italic;" id="mwlA">Design and Evolution of C++</span></a>, 1a, Addison-Wesley Publishing Company, 23 marzo 1994, <a rel="mw:WikiLink" href="ISBN" title="ISBN" id="mwlQ">ISBN</a><span typeof="mw:Entity" id="mwlg">&nbsp;</span>0-201-54330-3.</cite></span></li>
<li id="cite_note-4" data-mw-footnote-number="4"><span class="mw-cite-backlink" id="mwmA"><a href="#cite_ref-4" rel="mw:referencedBy" id="mwmQ"><span class="mw-linkback-text" id="mwmg">↑</span></a></span> <span id="mw-reference-text-cite_note-4" class="mw-reference-text reference-text"><cite class="citation libro" style="font-style:normal" typeof="mw:Transclusion" id="mwmw">Ray Lischner, <a rel="mw:ExtLink nofollow" href="https://archive.org/details/cinnutshell0000lisc" class="external text" id="mwnA"><span style="font-style:italic;" id="mwnQ">C++ in a Nutshell</span></a>, O'Reilly Media, 2003,  p.<span typeof="mw:Entity" id="mwng">&nbsp;</span><a rel="mw:ExtLink nofollow" href="https://archive.org/details/cinnutshell0000lisc/page/n227" class="external text" id="mwnw">212</a>, <a rel="mw:WikiLink" href="ISBN" title="ISBN" id="mwoA">ISBN</a><span typeof="mw:Entity" id="mwoQ">&nbsp;</span>0-596-00298-X.</cite></span></li>
</ol></div>

</section><section data-mw-section-id="4" id="mwow" aria-labelledby="Voci_correlate"><div class="mw-heading mw-heading2"><h2 id="Voci_correlate">Voci correlate</h2></div>
<ul id="mwpA"><li id="mwpQ"><a rel="mw:WikiLink" href="ISO_646" title="ISO 646" class="mw-redirect" id="mwpg">ISO 646</a></li>
<li id="mwpw"><a rel="mw:WikiLink" href="Digrammi_e_trigrammi" title="Digrammi e trigrammi" id="mwqA">Digrammi e trigrammi nel linguaggio C</a></li></ul>

</section><section data-mw-section-id="5" id="mwqQ" aria-labelledby="Collegamenti_esterni"><div class="mw-heading mw-heading2"><h2 id="Collegamenti_esterni">Collegamenti esterni</h2></div>
<ul id="mwqg"><li id="mwqw"><span typeof="mw:Transclusion" id="mwrA">(</span><span style="font-weight:bolder; font-size:80%"><abbr title="inglese">EN</abbr></span><span>) </span> <a rel="mw:ExtLink nofollow" href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/iso646.h.html" class="external text" id="mwrQ">iso646.h</a> da The Open Group Base Specifications Issue 7</li>
<li id="mwrg"><cite class="citation web" style="font-style:normal" typeof="mw:Transclusion" id="mwrw">(<span style="font-weight:bolder; font-size:80%"><abbr title="inglese">EN</abbr></span>) <a rel="mw:ExtLink nofollow" href="https://web.archive.org/web/20120702173300/http://www.cplusplus.com/reference/clibrary/ciso646/" class="external text"><span style="font-style:italic;">ISO 646 Alternative operator spellings</span></a>, su <span style="font-style:italic;">cplusplus.com</span>. <small>URL consultato il 4 luglio 2012</small> <small>(archiviato dall'<abbr title="http://www.cplusplus.com/reference/clibrary/ciso646/">url originale</abbr> il 2 luglio 2012)</small>.</cite></li>
<li id="mwsA"><cite class="citation web" style="font-style:normal" typeof="mw:Transclusion" id="mwsQ">Daniele Giacomini, <a rel="mw:ExtLink nofollow" href="http://a2.pluto.it/a2/a296.htm#almltitle4099" class="external text"><span style="font-style:italic;">Libreria C, con qualche estensione POSIX</span></a>, su <span style="font-style:italic;"><a rel="mw:WikiLink" href="Appunti_di_informatica_libera" title="Appunti di informatica libera">Appunti di informatica libera</a></span>, <span style="font-style:italic;">a2.pluto.it</span>.</cite></li></ul>



</section></div><!--htdig_noindex--><div><div class="zim-footer">
    Questa voce è stata pubblicata da <a class="external text" title="Ultima modifica il 2024-07-23" href="https://it.wikipedia.org/wiki/?title=Iso646.h&amp;oldid=140328700">Wikipedia</a>. Il testo è rilasciato in base alla licenza <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.it">Creative Commons Attribution-Share Alike 4.0</a>, salvo diversa indicazione. Potrebbero essere applicate clausole aggiuntive per i file multimediali.
</div>
</div><!--/htdig_noindex--></div>
            </div>
          </main>
        </div>
      </div>
    </div>
     <script src="./_webp_/webpHandler.js"></script>
  

</body></html>