In the ide the double is in blue (defined), it compiles but in printf it outputs garbage. According to help double is undefined. Is it defined or not, and what does it convert to?
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
Posted: Mon Jan 23, 2023 3:16 am
This depends on the chip involved.
In the standard PIC12/16/18 compiler the manual says:
Quote:
double - A reserved word but is not a supported data type.
It is reserved, because it exists when using the PIC24/30/33.
Normally if you declare a variable as 'double', it will be generated as
a standard float32. Normally it works as such. How are you trying to
print this?. A quick test shows it merrily working with %f to print.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum