Modifications

Sauter à la navigation Sauter à la recherche
60 octets ajoutés ,  22 mai 2016 à 19:56
Ligne 3 : Ligne 3 :  
{{traduction}}  
 
{{traduction}}  
 
== Pas de support virgule flottante ==
 
== Pas de support virgule flottante ==
Il n'y a pas de support pour les opérations en virgule flottante (''floating point'') sur WiPy.
+
Pour des raisons d'espace mémoire, il n'y a pas de support pour les opérations en virgule flottante (''floating point'') ni de module ''math'' sur le WiPy.
   −
Due to space reasons, there’s no floating point support, and no math module. This means that floating point numbers cannot be used anywhere in the code, and that all divisions must be performed using ‘//’ instead of ‘/’. Example:
+
Cela signifie qu'il n'est pas possible d'utiliser des nombres à virgule flottante dans le code. Toutes les divisions doivent dont être réalisée avec ‘//’ (division entière) à la place de ‘/’. Par exemple:
    
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
>>> r = 4 // 2  # this will work
+
>>> r = 4 // 2  # fonctionnera parfaitement
>>> r = 4 / 2  # this WON'T
+
>>> r = 4 / 2  # NE fonctionnera PAS
 
</syntaxhighlight>
 
</syntaxhighlight>
  
29 917

modifications

Menu de navigation