Rounding a long



  • Working on a project that has been in existence for 10 years has some interesting points, if only because you get to see so many programming style.

    For instance, there was the developer who claimed he didn't need to write comments because his programs "read like English" (but not any English I know); and then there was the girl straight out of college who enriched her code with comments like

    // **********************************************************
    // Return value
    // **********************************************************
    RETURN 1

    Yes, thanks, that really helps.

     And occasionally you find a little gem, like this:

    long al_pr_aov

    (snipped)

    // *************************************************************************
    // Round amount
    // *************************************************************************
    al_pr_aov=INT(al_pr_aov) *1.00



     



  • But you cut yourself on the sharp edges if you don't round the long...



  • @b_redeker said:

    // **********************************************************
    // Return value
    // **********************************************************
    RETURN 1

    Which is only marginally more stupid than comment requirements for Javadoc


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.