Quantcast
Channel: MPLAB C18 Compiler
Viewing all articles
Browse latest Browse all 475

Casting floats to long and then converting the result to string gives an overflow value!! (tim.rogue)

$
0
0
Using MPLABX, C18 on PIC18F87J72 The Problem: Casting floats to long -> converting result to a string -> send to LCD screen -> prints obviously overflowed value. i.e char str_buff; float flt1 = 1.436; long lng1 = (long) flt1; ltoa(lng1,str_buff); LCD_send..

Viewing all articles
Browse latest Browse all 475

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>