[Coco] CMOC C-like compiler now supports float under Color Basic

Pierre Sarrazin sarrazip at sarrazip.com
Wed Aug 16 22:47:07 EDT 2017


Hi,

Thanks for those suggestions. I'll have to think about that. But for now,
users who want to "future-proof" their code could use something like
"typedef float mbf40" and write their program using that name.

I don't personally plan to add other floating-point formats in the
foreseeable future. I will probably prioritize adding a (32-bit) 'long'
type, but I have no timetable for that.



Dixit John W. Linville (2017-08-16 10:51):
> This is a really good recommendation. It aligns with what I had in
> mind for my work with the bcc09 compiler (which I have mostly put on
> hold while CMOC develops).
> 
> I would propose a type name like "mbf40", since the Color BASIC ROMs
> are using the Microsoft Binary Format:
> 
> 	https://en.wikipedia.org/wiki/Microsoft_Binary_Format
> 
> Just my $0.02...
> 
> John
> 
> On Wed, Aug 16, 2017 at 09:44:40AM -0400, Mathieu Bouchard wrote:
> > 
> > I'd recommend reserving the keyword "float" for 32-bit floats and "double"
> > for 64-bit floats as on other compilers & computers, and come up with
> > another name such as "float40" or whatever for 40-bit float. This would be
> > just in case you add support for 32 or 64-bit floats one day.
> > 
> > 
> > Le 2017-08-12 à 21:29:00, Pierre Sarrazin a écrit :
> > > I have just published version 0.1.40 of CMOC, my C-like cross-compiler
> > > for the CoCo's Disk Basic environment.
> > > 
> > > This version adds support for the float type, i.e., floating-point
> > > arithmetic, when targeting the Color Basic environment. (The utility
> > > routines invoked by the compiler call several Color Basic routines.)

-- 
Pierre Sarrazin <sarrazip @ sarrazip . com>


More information about the Coco mailing list