Thread: fflush(stdin) and other odd topics

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    470

    fflush(stdin) and other odd topics

    XErath, often standards will leave constructs undefined in order for implementors to define them. For instance, 4/0 may be undefined for some language, but an implementor might want throw some exception when divide by 0 occurs. The value of sizeof(int), like above, isn't defined by the standard, but by the implementorl. So, when Microsoft defines what fflush(stdin) does, there's no problem; it's what the definition leaves out--that it's non-standard--which might be problem. But this is the fault of the documention not the compiler, and because most go to the compiler pages to learn about what the compiler does it's not too much of a problem, I think.

    Microsoft what ?!? You're joking right ?!?
    This is a piece of code from browser.js from Opera

    // Fixing MSDN
    // Problem: very IE-centric scripting, excludes other browsers with sniffing
    // Credits: Tarquin
    if( location.href.indexOf('http:\/\/msdn.microsoft.com\/workshop\/') == 0 ) {
    //more 70 lines of code
    Perhaps MS tried to detect IE and mozilla versions great enough to run the site but forgot opera?
    Last edited by okinrus; 07-07-2005 at 01:12 AM. Reason: the value of sizeof(int) and cleanup

Popular pages Recent additions subscribe to a feed