www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/11/21/02:02:56

Date: Sun, 20 Nov 1994 22:57:49 -0500 (CDT)
From: Aaron Ucko <UCKO AT VAX1 DOT ROCKHURST DOT EDU>
Subject: Re: printf or floating point error?????
To: dolan AT fnoc DOT navy DOT mil
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Organization: Rockhurst College; Kansas City, MO

[major deletion]

>That's why the world's most successful language, COBOL, reads like
>English.
Yes, but how easy is it to do something non-trivial with it as compared to C?
And how bloated is the source?

[more stuff cut]

>That's why, in Modula-2, the equivalent of printf() is one of the
>things Wirth omitted deliberately and with commentary, for just the
>reasons of the results shown above.  If you want to print ten items,
>you use ten write statements, each of which writes exactly one kind
>of data with no type coercion.

What's wrong with C++ iostreams?  They do all that and more--and more
compactly, too.

[and even more]

>Oh, and my aplogies to the original poster.  The compiler seems to be
>broken.

Which one?  TC seems to be the broken compiler from what I've read...it also
fails to compile correctly the following (admittedly ridiculous) program:

int main()
{
  float f=3//* // should only start a comment in C++ */5;
  if(f>2) puts("This compiler fails to compile legal C code");
  else puts("This compiler works the way it should");
  return f>2;
}

--- Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu; finger for PGP public key) -=- httyp!
-=*=-Just because you're paranoid doesn't mean they aren't out to get you.-=*=-
Geek code 2.1 [finger hayden AT vax1 DOT mankato DOT msus DOT edu for explanation]: 
 GCS/M/S d(-) H s g+ p? !au a-- w+ v+ C++(+++)>++++ U-(S+)>++++ P+ L>++ 3(-) 
 E-(----) !N>++ K- W(--) M-(--) V(--) po-(--) Y+(++) t(+) !5 j R G tv--(-) 
 b+++ !D(--) B--(---) e>++++(*) u++(@) h!() f(+) r-(--)>+++ n+(-) y?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019