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
11 posts
• Page 2 of 2 • 1, 2
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)- Posts: 545
- Images: 32
- Joined: 19 Jan 2021, 09:41
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- GitHub: SlyVTT
11 posts
• Page 2 of 2 • 1, 2
Return to Langages alternatifs
Who is online
Users browsing this forum: ClaudeBot [spider] and 10 guests