|
From: Nicholas N. <nj...@ca...> - 2003-03-18 12:42:05
|
> And when hiding types, how do I do this: > VG_(message)(Vg_UserMsg, "Time: %d/%02d/%02d %02d:%02d:%02d", > tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, > tm.tm_hour, tm.tm_min, tm.tm_sec ); > > '%d' is good for 'int', what is the correct one for 'Int'? If I > use '%ld' then I violated the type hiding. In C this is a problem > and for this reason I prefer to use basic types wherever I can, and > typedef only where actually necessary. We use '%d' everywhere. I guess the use of Int instead of int isn't so important, more a convention maybe (although Julian may disagree). N |