<!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>Conio.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/Conio.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-Conio_h rootpage-Conio_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">conio.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="mwAg"></span>
<p id="mwAw"><b id="mwBA">conio.h</b> è un <a rel="mw:WikiLink" href="Header_file" title="Header file" class="mw-redirect" id="mwBQ">header file</a> del <a rel="mw:WikiLink" href="Linguaggio_di_programmazione" title="Linguaggio di programmazione" id="mwBg">linguaggio di programmazione</a> <a rel="mw:WikiLink" href="C_(linguaggio)" title="C (linguaggio)" class="mw-redirect" id="mwBw">C</a>. È utilizzato dai <a rel="mw:WikiLink" href="Compilatore" title="Compilatore" id="mwCA">compilatori</a> per <a rel="mw:WikiLink" href="MS-DOS" title="MS-DOS" id="mwCQ">MS-DOS</a> per creare interfacce testuali. Non è descritto nel libro <a rel="mw:WikiLink" href="Il_linguaggio_C" title="Il linguaggio C" id="mwCg">Il linguaggio C</a> di <a rel="mw:WikiLink" href="Brian_Kernighan" title="Brian Kernighan" id="mwCw">Brian Kernighan</a> e <a rel="mw:WikiLink" href="Dennis_Ritchie" title="Dennis Ritchie" id="mwDA">Dennis Ritchie</a>, in quanto non fa parte della <a rel="mw:WikiLink" href="Libreria_standard_del_C" title="Libreria standard del C" id="mwDQ">libreria standard del C</a>. Inoltre non è incluso nella famiglia di standard <a rel="mw:WikiLink" href="POSIX" title="POSIX" id="mwDg">POSIX</a>.</p>

<p id="mwDw">In questa intestazione sono dichiarate diverse funzioni create perché un programma possa eseguire particolari operazioni di <a rel="mw:WikiLink" href="Input/output" title="Input/output" id="mwEA">input/output</a> su <a rel="mw:WikiLink" href="Interfaccia_a_riga_di_comando" title="Interfaccia a riga di comando" id="mwEQ">terminale</a>.
Molti dei compilatori C per DOS, <a rel="mw:WikiLink" href="Windows_3.x" title="Windows 3.x" id="mwEg">Windows 3.x</a>, <a rel="mw:WikiLink" href="OS/2" title="OS/2" id="mwEw">OS/2</a>, o <a rel="mw:WikiLink" href="Windows_API" title="Windows API" id="mwFA">Win32</a><sup class="mw-ref reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1" id="mwFQ"><span class="mw-reflink-text" id="mwFg"><span class="cite-bracket" id="mwFw">[</span>1<span class="cite-bracket" id="mwGA">]</span></span></a></sup> contengono questo header, a differenza della maggior parte dei compilatori per <a rel="mw:WikiLink" href="UNIX" title="UNIX" class="mw-redirect" id="mwGQ">UNIX</a> e <a rel="mw:WikiLink" href="Linux" title="Linux" id="mwGg">Linux</a>. Alcuni <a rel="mw:WikiLink" href="Sistema_embedded" title="Sistema embedded" id="mwGw">sistemi integrati</a> usano una libreria compatibile con <kbd id="mwHA">conio.h</kbd><sup class="mw-ref reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-2" id="mwHQ"><span class="mw-reflink-text" id="mwHg"><span class="cite-bracket" id="mwHw">[</span>2<span class="cite-bracket" id="mwIA">]</span></span></a></sup>.</p>

<p id="mwIQ">Le funzioni di libreria dichiarate da <kbd id="mwIg">conio.h</kbd> variano da compilatore a compilatore. Originariamente, nel linguaggio <a rel="mw:WikiLink" href="Lattice_C" title="Lattice C" id="mwIw">Lattice C</a>, le funzioni erano mappate direttamente sulle prime funzioni int 21h del DOS. Successivamente, la libreria fornita con il <a rel="mw:WikiLink" href="Turbo_C" title="Turbo C" id="mwJA">Turbo C</a> non utilizzava più le <a rel="mw:WikiLink" href="Application_programming_interface" title="Application programming interface" id="mwJQ">API</a> di DOS ma accedeva direttamente alla <a rel="mw:WikiLink" href="RAM" title="RAM" id="mwJg">RAM</a> video, utilizzando gli <a rel="mw:WikiLink" href="Interrupt" title="Interrupt" id="mwJw">interrupt</a> del <a rel="mw:WikiLink" href="BIOS" title="BIOS" id="mwKA">BIOS</a> per gli output a schermo.</p>

<dl id="mwKQ"><dt id="mwKg">Alcune funzioni della libreria<sup class="mw-ref reference" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-3" id="mwKw"><span class="mw-reflink-text" id="mwLA"><span class="cite-bracket" id="mwLQ">[</span>3<span class="cite-bracket" id="mwLg">]</span></span></a></sup></dt></dl>
<ul id="mwLw"><li id="mwMA"><kbd id="mwMQ">kbhit()</kbd> - Se un tasto qualsiasi viene premuto, questa funzione restituisce un valore non nullo, altrimenti restituisce 0.</li>
<li id="mwMg"><kbd id="mwMw">getch()</kbd> - Legge l'immissione da console di un carattere senza passare per il <a rel="mw:WikiLink" href="Buffer" title="Buffer" id="mwNA">buffer</a> e senza stampare a schermo il carattere digitato.</li>
<li id="mwNQ"><kbd id="mwNg">getche()</kbd> - Come <kbd id="mwNw">getch</kbd> ma stampando a schermo il carattere digitato.</li>
<li id="mwOA"><kbd id="mwOQ">clrscr()</kbd> - Cancella lo schermo e muove il cursore nell'angolo in alto a sinistra dello schermo.</li>
<li id="mwOg"><kbd id="mwOw">delline()</kbd> - Sposta in alto di una linea, tutte le linee presenti sotto il cursore (cancellando, quindi, la linea in cui si trova il cursore stesso).</li>
<li id="mwPA"><kbd id="mwPQ">gotoxy(int x, int y)</kbd> - Questa funzione richiede come argomenti due numeri interi, X ed Y, e muove il cursore nella posizione di coordinate (X,Y) sullo schermo.</li>
<li id="mwPg"><kbd id="mwPw">wherex()</kbd> - Restituisce la coordinata X del cursore, nel momento dell'esecuzione della funzione.</li>
<li id="mwQA"><kbd id="mwQQ">wherey()</kbd> - Restituisce la coordinata Y del cursore, nel momento dell'esecuzione della funzione.</li>
<li id="mwQg"><kbd id="mwQw">textcolor(int colorcode)</kbd> - Cambia il colore del testo. L'argomento <kbd id="mwRA">colorcode</kbd> è un numero intero che seleziona il colore scelto. Oltre ad inserire direttamente il codice numerico come argomento, possono essere utilizzati anche i seguenti parametri predefiniti: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY, DARKGRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE<sup class="mw-ref reference" id="cite_ref-4" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-4" id="mwRQ"><span class="mw-reflink-text" id="mwRg"><span class="cite-bracket" id="mwRw">[</span>4<span class="cite-bracket" id="mwSA">]</span></span></a></sup>.</li>
<li id="mwSQ"><kbd id="mwSg">textbackground(int colorcode)</kbd> - Cambia il colore dello sfondo del testo inserito. I codici numerici che individuano il colore sono gli stessi definiti per la funzione <kbd id="mwSw">textcolor</kbd>.</li></ul>

</section><section data-mw-section-id="1" id="mwTA" 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="mwTQ"><ol class="mw-references references" id="mwTg"><li id="cite_note-1" data-mw-footnote-number="1"><span class="mw-cite-backlink" id="mwTw"><a href="#cite_ref-1" rel="mw:referencedBy" id="mwUA"><span class="mw-linkback-text" id="mwUQ">↑</span></a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text reference-text"><cite class="citation web" style="font-style:normal" typeof="mw:Transclusion" id="mwUg"><a rel="mw:ExtLink nofollow" href="https://msdn.microsoft.com/en-us/library/7x2hy4cx(VS.71).aspx" class="external text" id="mwUw"><span style="font-style:italic;" id="mwVA">Console and Port I/O in MSDN</span></a>, su <span style="font-style:italic;" id="mwVQ">msdn.microsoft.com</span>.</cite></span></li>
<li id="cite_note-2" data-mw-footnote-number="2"><span class="mw-cite-backlink" id="mwVg"><a href="#cite_ref-2" rel="mw:referencedBy" id="mwVw"><span class="mw-linkback-text" id="mwWA">↑</span></a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text reference-text"><cite class="citation web" style="font-style:normal" typeof="mw:Transclusion" id="mwWQ"><a rel="mw:ExtLink nofollow" href="https://web.archive.org/web/20140621051419/http://www.microvga.com/conio-lib" class="external text" id="mwWg"><span style="font-style:italic;" id="mwWw">MicroVGA conio Text User Interface Library</span></a>, su <span style="font-style:italic;" id="mwXA">microvga.com</span>. <small id="mwXQ">URL consultato l'11 ottobre 2012</small> <small id="mwXg">(archiviato dall'<abbr title="http://www.microvga.com/conio-lib" id="mwXw">url originale</abbr> il 21 giugno 2014)</small>.</cite></span></li>
<li id="cite_note-3" data-mw-footnote-number="3"><span class="mw-cite-backlink" id="mwYA"><a href="#cite_ref-3" rel="mw:referencedBy" id="mwYQ"><span class="mw-linkback-text" id="mwYg">↑</span></a></span> <span id="mw-reference-text-cite_note-3" class="mw-reference-text reference-text"><cite class="citation web" style="font-style:normal" typeof="mw:Transclusion" id="mwYw"><a rel="mw:ExtLink nofollow" href="http://www.programmingsimplified.com/c/conio.h" class="external text" id="mwZA"><span style="font-style:italic;" id="mwZQ">conio.h - Programming Simplified</span></a>, su <span style="font-style:italic;" id="mwZg">programmingsimplified.com</span>.</cite></span></li>
<li id="cite_note-4" data-mw-footnote-number="4"><span class="mw-cite-backlink" id="mwZw"><a href="#cite_ref-4" rel="mw:referencedBy" id="mwaA"><span class="mw-linkback-text" id="mwaQ">↑</span></a></span> <span id="mw-reference-text-cite_note-4" class="mw-reference-text reference-text"><cite class="citation web" style="font-style:normal" typeof="mw:Transclusion" id="mwag"><a rel="mw:ExtLink nofollow" href="http://www.programmingsimplified.com/c/graphics.h/colors" class="external text" id="mwaw"><span style="font-style:italic;" id="mwbA">colors in c graphics - Programming Simplified</span></a>, su <span style="font-style:italic;" id="mwbQ">programmingsimplified.com</span>.</cite></span></li>
</ol></div>

</section><section data-mw-section-id="2" id="mwbg" aria-labelledby="Collegamenti_esterni"><div class="mw-heading mw-heading2"><h2 id="Collegamenti_esterni">Collegamenti esterni</h2></div>
<ul id="mwbw"><li id="mwcA"><cite class="citation web" style="font-style:normal" typeof="mw:Transclusion" id="mwcQ"><a rel="mw:ExtLink nofollow" href="http://code-reference.com/c/conio.h" class="external text"><span style="font-style:italic;">conio.h Library overview</span></a>, su <span style="font-style:italic;">code-reference.com</span>.</cite></li>
<li id="mwcg"><a rel="mw:ExtLink nofollow" href="https://inlarn.com/" class="external text" id="mwcw">Conio.h - Inlarn, su inlarn.com</a> <a rel="mw:ExtLink nofollow" href="https://web.archive.org/web/20210728063650/https://inlarn.com/" typeof="mw:Transclusion" class="external text" id="mwdA">Archiviato</a><span> il 28 luglio 2021 in </span><a rel="mw:WikiLink" href="Internet_Archive" title="Internet Archive">Internet Archive</a><span>.</span></li>
<li id="mwdg"><cite class="citation web" style="font-style:normal" typeof="mw:Transclusion" id="mwdw"><a rel="mw:ExtLink nofollow" href="http://www.programmingsimplified.com/c/conio.h" class="external text"><span style="font-style:italic;">Documentazione di <i>Programming Simplified</i><span></span></span></a>, su <span style="font-style:italic;">programmingsimplified.com</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 2025-08-01" href="https://it.wikipedia.org/wiki/?title=Conio.h&amp;oldid=146072348">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>