Modifications

Sauter à la navigation Sauter à la recherche
1 octet supprimé ,  24 février 2015 à 11:52
aucun résumé de modification
Ligne 19 : Ligne 19 :     
== Callback bouton ==
 
== Callback bouton ==
=== Qu'est-ce qu'un callback? ==
+
=== Qu'est-ce qu'un callback? ===
{{block-etroit|text=En informatique, une fonction de rappel (callback en anglais) ou fonction de post-traitement est une fonction qui est passée en argument à une autre fonction. Cette dernière peut alors faire usage de cette fonction de rappel comme de n'importe quelle autre fonction, alors qu'elle ne la connaît pas par avance.<small><br />Source: [http://fr.wikipedia.org/wiki/Fonction_de_rappel Fonction de rappel sur Wikipedia]</small>
+
{{bloc-etroit|text=En informatique, une fonction de rappel (callback en anglais) ou fonction de post-traitement est une fonction qui est passée en argument à une autre fonction. Cette dernière peut alors faire usage de cette fonction de rappel comme de n'importe quelle autre fonction, alors qu'elle ne la connaît pas par avance.<small><br />Source: [http://fr.wikipedia.org/wiki/Fonction_de_rappel Fonction de rappel sur Wikipedia]</small>
 
}}
 
}}
 
=== L'objet switch ===
 
=== L'objet switch ===
{{block-etroit|text='''switch''' est un terme anglais signifiant "''bouton''" ou "''interrupteur''".
+
{{bloc-etroit|text='''switch''' est un terme anglais signifiant "''bouton''" ou "''interrupteur''".
    
Nous disions donc que le '''switch''' is a very simple object, but it does have one advanced feature: the sw.callback() function. The callback function sets up something to run when the switch is pressed, and uses an interrupt. It’s probably best to start with an example before understanding how interrupts work. Try running the following at the prompt:
 
Nous disions donc que le '''switch''' is a very simple object, but it does have one advanced feature: the sw.callback() function. The callback function sets up something to run when the switch is pressed, and uses an interrupt. It’s probably best to start with an example before understanding how interrupts work. Try running the following at the prompt:
29 836

modifications

Menu de navigation