Yes, agree that's a mistake of mine.
This only work with insurance of working with positive values.
If not (i.e. if values can be either positive of negative), only int --> long --> long long --> float --> double --> long double is safe.
note: unsigned values conversion "upward" is always valid and safe : unsigned int --> unsigned long --> unsigned long long.
Ciao
Sly
[Résolu] Problème de conversion int en C
Re: [Résolu] Problème de conversion int en C
Some works in progress :
The GUI Toolkit NF for nSpire | MyShmup for fxCG-50 | Magic Light for Casio Graph 90+E and Magic Light for nSpire CX/CX-II | Simple Text Editor for nSpire | OutRun for Casio Graph 90+E |
And more to come ... stay tuned
-
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)- Messages: 484
- Images: 31
- Inscription: 19 Jan 2021, 09:41
- Localisation: France
- Genre:
- Calculatrice(s):→ MyCalcs profile
- GitHub: SlyVTT
11 messages
• Page 2 sur 2 • 1, 2
Retourner vers Langages alternatifs
Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 33 invités