Abl-electronic PIC Microcontrollers PIC16 Manuel d'utilisateur Page 72

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 312
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 71
Void Type
void is a special type indicating the absence of any value. There are no objects of
void; instead, void is used for deriving more complex types.
Void Functions
Use the
void keyword as a function return type if the function does not return a
value. For example:
void print_temp(char temp) {
Lcd_Out_Cp("Temperature:");
Lcd_Out_Cp(temp);
Lcd_Chr_Cp(223);
// degree character
Lcd_Chr_Cp('C');
}
Use void as a function heading if the function does not take any parameters.
Alternatively, you can just write empty parentheses:
main(void) {
// same as main()
...
}
Generic Pointers
Pointers can be declared as
void, meaning that they can point to any type. These
pointers are sometimes called generic.
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
64
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
Vue de la page 71
1 2 ... 67 68 69 70 71 72 73 74 75 76 77 ... 311 312

Commentaires sur ces manuels

Pas de commentaire