• (cs) in reply to PedanticCurmudgeon
    PedanticCurmudgeon:
    iToad:
    This is a clear case where a Software Engineer IV needs to be busted back to something not involving computers or logical thought.
    FTFY

    Perhaps he should get a job as one of those guys who stands in the middle of a shopping precinct wearing a suit and big glasses, carrying a bunch of badly-printed pamphlets with which he attempts to engage passers-by in conversation. He'd probably be clever enough for that, but not clever enough to divine its pointlessness as an occupation.

  • (cs) in reply to @Deprecated
    @Deprecated:
    Buddy:
    frits:
    Potiguar:
    All he needed was:

    enum Numbers { forty_two = 42; }

    Seriously, who hasn't made this joke?

    Correction:

    enum Numbers
    {
       forty_two = six times nine;
    }

    #define SIX 1 + 5 #define NINE 8 + 1 printf("%d\n", SIX * NINE);

    output: 42

    Don't forget:

    #define number_base = 13;

    or it won't work.

  • JIY (unregistered) in reply to J
    J:
    Dotan Cohen:
    J:
    Obviously, a coder's job is to know the language. But seriously, C, prepending a 0 changes the radix? WTF?

    You even have that in todays "modern high level" languages, such as PHP: echo intval(42); // 42 echo intval(042); // 34 echo intval('042'); // Guess!

    That last one is the one that bit me. Try to guess what it outputs, before looking it up.

    I had to look it up. I won't spoil it, but it looks like there's an optional second argument which can be used to specify the base, when it might be ambiguous.

    Anyway, there were plenty of characters that could have been used to denote octal. Why would they pick one which already had an excepted (different!) mathematical meaning at that position?

    0

  • (cs) in reply to vexorian
    vexorian:
    He strikes me as a guy who (like many of us) got hit by octal values one day during his beginner days. Hahaha they joy of getting compile errors or wrong values after using [08] to align some array filling code.

    Unfortunately for him, unlike what anyone with decency would do, he assumed it was yet another compiler bug that was burning him. Instead of learning about octal values. Oh well.

    Hah! I wondered if someone would mention that. Years ago I worked for a company that wrote shipping system software. By sheer chance, one year the postal service first class rates had no 8's or 9's in the prices. A couple coworkers came to me one day VERY frustrated. They had been working for several days trying to debug some bit of the code involving first-class shipping and couldn't find what was wrong. They handed me a paper listing of the code and asked if I could see anything wrong. I took one glance at the neatly formatted postal codes in the static array in C and asked "why are these in octal?" They both simultaneously screamed "argh!" and snatched the listing from my hands and went off to fix the problem.

    The code wasn't originally done in octal. I found out later they were just trying to pretty it up without really thinking about what they were doing.

  • J (unregistered) in reply to Michael
    Michael:
    Kef Schecter:
    The real WTF here, however, was me. It took me three passes over the code before I noticed the leading zeroes.
    No, the real WTF was that C used leading zeroes for octal numbers when a prefix like 0o would have done just as well and caused everyone far fewer headaches. (After all, there was already 0x for hex).
    Why would people use leading 0s in code (other than when they want to specify Octal)?

    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

  • nulla (unregistered)

    This is an incredibly clever way to get around the

    #define 3 10

    problem.

  • Michael (unregistered) in reply to J
    J:
    Michael:
    Kef Schecter:
    The real WTF here, however, was me. It took me three passes over the code before I noticed the leading zeroes.
    No, the real WTF was that C used leading zeroes for octal numbers when a prefix like 0o would have done just as well and caused everyone far fewer headaches. (After all, there was already 0x for hex).
    Why would people use leading 0s in code (other than when they want to specify Octal)?

    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

    Uhm, but surely these values don't appear in the code.... (hint sprintf(filename, "%d-FileName.txt", 001); will still put "1-FileName.txt" in filename - you'd use sprintf(filename, "%02d-FileName.txt", 1).

    For columns - if it's in your code, then use spaces (they're free)...

    Let me ask the question again, when in your code do you use preceding 0's (other than to specify Octal)?

  • Nag-Geoff (unregistered) in reply to Matt Westwood
    frits:
    Potiguar:
    All he needed was:

    enum Numbers { forty_two = 42; }

    Seriously, who hasn't made this joke?

    The Hitchhiker's Galaxy is for people who want to cling on to the past and proclaim "Days were always better then!".

  • Zanthra (unregistered)

    I recall some people I have worked with explaining that in fortran if you passed a number by reference into the parameter of a function, and that function changed the value of the parameter, it would change the value of that number in the program forevermore.

  • Bldsquirrel (unregistered)

    So, what are the chances that he actually got burned by using magic number 23 instead of MEANINGFULLY_NAMED_CONSTANT?

  • Bldsquirrel (unregistered) in reply to J
    J:
    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

    This is one of those problems that, when it crops up, should be taken as a sign that you're doing things the wrong way in the first place.

    1 is a number. 00001 is a string.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered) in reply to J

    int numbers[] = { .001 * 1000, .002 * 1000, .003 * 1000, .004 * 1000, .005 * 1000, .006 * 1000, .007 * 1000, .008 * 1000, .009 * 1000, .010 * 1000, . . . };

  • (cs) in reply to Bldsquirrel
    Bldsquirrel:
    J:
    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

    This is one of those problems that, when it crops up, should be taken as a sign that you're doing things the wrong way in the first place.

    1 is a number. 00001 is a string.

    00401 is a ZIP code (which happens to be for Pleasantville, New York, the home of Reader's Digest). Excel allows the numeric format 00000 to prevent suppression of leading zeroes if you should happen to require ZIP codes in your data.

  • Jim (unregistered) in reply to da Doctah
    da Doctah:
    Bldsquirrel:
    J:
    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

    This is one of those problems that, when it crops up, should be taken as a sign that you're doing things the wrong way in the first place.

    1 is a number. 00001 is a string.

    00401 is a ZIP code (which happens to be for Pleasantville, New York, the home of Reader's Digest). Excel allows the numeric format 00000 to prevent suppression of leading zeroes if you should happen to require ZIP codes in your data.

    Who cares.

    I assume (no being a yank) that Zip codes are always 5 digits, so we can still store it as 401 and pad out the 0s when we need to display.
    Pretty sure when we read input we don't make assumptions on format, so leading 0s don't mean diddly squat

  • (cs) in reply to Jim
    Jim:
    da Doctah:
    Bldsquirrel:
    J:
    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

    This is one of those problems that, when it crops up, should be taken as a sign that you're doing things the wrong way in the first place.

    1 is a number. 00001 is a string.

    00401 is a ZIP code (which happens to be for Pleasantville, New York, the home of Reader's Digest). Excel allows the numeric format 00000 to prevent suppression of leading zeroes if you should happen to require ZIP codes in your data.

    Who cares.

    I assume (no being a yank) that Zip codes are always 5 digits, so we can still store it as 401 and pad out the 0s when we need to display.
    Pretty sure when we read input we don't make assumptions on format, so leading 0s don't mean diddly squat

    Sometimes they're five digits.

    Sometimes they're nine digits with a dash between the fifth and sixth.

    Oh, and if you want to send mail to Canada, they're letter-digit-letter-space-digit-letter-digit.

    So best to just make it a string and add custom validation based on the country if you want to.

  • Jim (unregistered) in reply to Maurits
    Maurits:
    Jim:
    da Doctah:
    Bldsquirrel:
    J:
    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

    This is one of those problems that, when it crops up, should be taken as a sign that you're doing things the wrong way in the first place.

    1 is a number. 00001 is a string.

    00401 is a ZIP code (which happens to be for Pleasantville, New York, the home of Reader's Digest). Excel allows the numeric format 00000 to prevent suppression of leading zeroes if you should happen to require ZIP codes in your data.

    Who cares.

    I assume (no being a yank) that Zip codes are always 5 digits, so we can still store it as 401 and pad out the 0s when we need to display.
    Pretty sure when we read input we don't make assumptions on format, so leading 0s don't mean diddly squat

    Sometimes they're five digits.

    Sometimes they're nine digits with a dash between the fifth and sixth.

    Oh, and if you want to send mail to Canada, they're letter-digit-letter-space-digit-letter-digit.

    So best to just make it a string and add custom validation based on the country if you want to.

    That's a very good point - if they don't really have any valuable reason to be numbers, don't store them as numbers...

  • Giuseppe (unregistered) in reply to Jim
    Jim:
    Maurits:
    Jim:
    da Doctah:
    Bldsquirrel:
    J:
    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

    This is one of those problems that, when it crops up, should be taken as a sign that you're doing things the wrong way in the first place.

    1 is a number. 00001 is a string.

    00401 is a ZIP code (which happens to be for Pleasantville, New York, the home of Reader's Digest). Excel allows the numeric format 00000 to prevent suppression of leading zeroes if you should happen to require ZIP codes in your data.

    Who cares.

    I assume (no being a yank) that Zip codes are always 5 digits, so we can still store it as 401 and pad out the 0s when we need to display.
    Pretty sure when we read input we don't make assumptions on format, so leading 0s don't mean diddly squat

    Sometimes they're five digits.

    Sometimes they're nine digits with a dash between the fifth and sixth.

    Oh, and if you want to send mail to Canada, they're letter-digit-letter-space-digit-letter-digit.

    So best to just make it a string and add custom validation based on the country if you want to.

    That's a very good point - if they don't really have any valuable reason to be numbers, don't store them as numbers...
    Same Probably goes for numero Telefono

  • (cs) in reply to Maurits
    Maurits:
    Jim:
    da Doctah:
    Bldsquirrel:
    J:
    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

    This is one of those problems that, when it crops up, should be taken as a sign that you're doing things the wrong way in the first place.

    1 is a number. 00001 is a string.

    00401 is a ZIP code (which happens to be for Pleasantville, New York, the home of Reader's Digest). Excel allows the numeric format 00000 to prevent suppression of leading zeroes if you should happen to require ZIP codes in your data.

    Who cares.

    I assume (no being a yank) that Zip codes are always 5 digits, so we can still store it as 401 and pad out the 0s when we need to display.
    Pretty sure when we read input we don't make assumptions on format, so leading 0s don't mean diddly squat

    Sometimes they're five digits.

    Sometimes they're nine digits with a dash between the fifth and sixth.

    Oh, and if you want to send mail to Canada, they're letter-digit-letter-space-digit-letter-digit.

    So best to just make it a string and add custom validation based on the country if you want to.

    The real WTF is all those stupid fucking programs vomited up by shit-for-brains programmers which are supposedly for the international market where the (mandatory) postcode field allows only digits.

  • John Hensley (unregistered)

    Number_9; Number_9; Number_9; Number_9;

  • J (unregistered) in reply to Bldsquirrel
    Bldsquirrel:
    J:
    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

    This is one of those problems that, when it crops up, should be taken as a sign that you're doing things the wrong way in the first place.

    1 is a number. 00001 is a string.

    For any example I could think of, someone could say "Well, just don't do it that way." And that's fine. But my point is that 0120, for example, has a numerical meaning to non-programmers/beginners that is very different from the programming language's interpretation, and it didn't have to be that way.

  • Mr.Burns (unregistered)

    whats wrong with you ppl. Not 1 grammar-nazi correcting 'burned' to 'burnt' !! Shame!

  • (cs)

    This is where I'd be sorely tempted to modify the compiler to randomly re-arrange enums with a significant number of number words as identifiers.

    After all, if they can get literals wrong, what's to stop them from getting enums wrong too? It would be a highly amusing prank to play.

  • Mathlete (unregistered) in reply to Mr.Burns
    Mr.Burns:
    whats wrong with you ppl. Not 1 grammar-nazi correcting 'burned' to 'burnt' !! Shame!

    Maybe because "burned" and "burnt" are both accepted spellings for the past participle of "burn"? Additionally since the usage of "burned" was in a quotation, it would not be corrected to "burnt" anyway, it would be "burned[sic]", if anything.

  • t1gerdog (unregistered) in reply to xyz

    Agreed. I hate these fag frist idiots. They make every comment section start by immediately pissing those with a real sense of humor off. It sure never gets old. Never!

  • J (unregistered) in reply to Mathlete
    Mathlete:
    Maybe because "burned" and "burnt" are both accepted spellings for the past participle of "burn"? Additionally since the usage of "burned" was in a quotation, it would not be corrected to "burnt" anyway, it would be "burned[sic]", if anything.

    I find it a little ridiculous that we're still using Latin in English sentences, e.g. "e.g.", "[sic]", "i.e.", "per se", "etc.", etc.

  • Catprog (unregistered) in reply to Jay
    Jay:
    I think this story falls under the general heading, "Programmer Refused to Belive that his Code had a Bug and Insisted it Must Be a Compiler Error".

    I recall a programmer I worked with who had a bug in her program so that a certain field printed as zero rather than the value it was supposed to have. So she tried twenty different ways to display the value of the field. They all showed zero. She insisted that there must be something wrong with the print function that it would not print the correct value, rather than even considering the possibility that she might never have set it.

    that reminds me of my first qbasic program

    Print hello world

    which then changed to

    Print hello; world;

    and then on the screen 0 0.

    next day at the school libary I reread the book and found out I needed to put print "Hello world"

  • (cs) in reply to J
    J:
    Anyway, there were plenty of characters that could have been used to denote octal. Why would they pick one which already had an excepted (different!) mathematical meaning at that position?
    Which characters did you have in mind which (a) were in 7-bit ASCII excluding control characters, (b) weren't used for something else, (c) are readily available on most keyboards, and (d) couldn't be the start of a legal identifier? There aren't really that many choices. Maybe @, if you think that's an improvement.
  • (cs) in reply to mott555
    mott555:
    I wonder if he uses a compiler he wrote.

    You have to admit that's a cool way to justify complexification: Write a bad compiler and then use its deficiencies to justify your complexification.

    That's "why" they wrote INTERCAL.

  • Rollyn01 (unregistered) in reply to Scarlet Manuka
    Scarlet Manuka:
    J:
    Anyway, there were plenty of characters that could have been used to denote octal. Why would they pick one which already had an excepted (different!) mathematical meaning at that position?
    Which characters did you have in mind which (a) were in 7-bit ASCII excluding control characters, (b) weren't used for something else, (c) are readily available on most keyboards, and (d) couldn't be the start of a legal identifier? There aren't really that many choices. Maybe @, if you think that's an improvement.

    Don't say that. Someone might confuse this site with twitter or their email account from looking at the article.

    Captcha: Ratis. Gratis is free, ratis not.

  • (cs) in reply to Jay
    Jay:
    But think of the advantages! For example, if the value of "seven" changes, there's only one place to go to fix it!

    If the VALUE of "seven" change... the value of seven should never.... oooh I see what you did there... nice burn.

  • My Dear Aunt Sally (unregistered) in reply to Matt Westwood
    Matt Westwood:
    @Deprecated:
    Buddy:
    frits:
    Potiguar:
    All he needed was:

    enum Numbers { forty_two = 42; }

    Seriously, who hasn't made this joke?

    Correction:

    enum Numbers
    {
       forty_two = six times nine;
    }

    #define SIX 1 + 5 #define NINE 8 + 1 printf("%d\n", SIX * NINE);

    output: 42

    Don't forget:

    #define number_base = 13;

    or it won't work.

    Please excuse me!

  • Spanner (unregistered) in reply to OneOfTheFew

    Just taking a different line here. Could the bloviator be referring to the fact that using literals would have made the compiler use 32 bits but the code depended on assuming values to be 16 bits? And hence the usage of enum (evidenced by the max value variable). Though another gotcha here is that if you use a maxval element of 0xffff, the enum is again going use 32 bits. To force it to 16 bits, you need to use 0x7fff

  • Herby (unregistered)

    Constants! Constants?? Fortran!!

    <main> CALL SUB (1.0, 2.0) ... <subroutine> SUBROUTINE SUB (A, B) A=2.0 B=7.0 RETURN END

    Works wonders for generating bugs.

  • (cs) in reply to J
    J:
    Mathlete:
    Maybe because "burned" and "burnt" are both accepted spellings for the past participle of "burn"? Additionally since the usage of "burned" was in a quotation, it would not be corrected to "burnt" anyway, it would be "burned[sic]", if anything.

    I find it a little ridiculous that we're still using Latin in English sentences, e.g. "e.g.", "[sic]", "i.e.", "per se", "etc.", etc.

    Yes well you would because you're an ignorant anti-intellectual subhuman who can't even tell the difference between "except" and "accept". Go stick your head in a bucket of water three times and pull it out twice.

  • (cs) in reply to Herby
    Herby:
    Constants! Constants?? Fortran!! <main> CALL SUB (1.0, 2.0) ... <subroutine> SUBROUTINE SUB (A, B) A=2.0 B=7.0 RETURN END

    Works wonders for generating bugs.

    That just makes the program crash at runtime, so it's easily tracked down. No big deal.

  • Bldsquirrel (unregistered) in reply to J
    J:
    For any example I could think of, someone could say "Well, just don't do it that way."

    ...and they'd be right. Even if you were coding in a language where assigning "0001" as an integer value would carry the leading zeros when concatenating with a string, you'd still be putting your formatting logic in a place where it didn't belong.

  • Bldsquirrel (unregistered) in reply to da Doctah
    da Doctah:
    00401 is a ZIP code (which happens to be for Pleasantville, New York, the home of Reader's Digest).

    So store it as a string? Again, stop and think about what you're doing. If the exact sequence of characters is what's important, not the numerical value, then it's not an integer. It's a string.

    Stop hacking, do things the right way, and save yourself a lot of effort.

  • Jeremy Friesner (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    In his defence: as soon as I said, "They're octal," he did a facepalm and went to fix it.

    Also in his defense, using a leading zero to indicate a different base was a bad idea by the C language people. It clashes with everyone's intuition (learned in elementary school math class) that leading zeroes don't change the meaning of a number.

    They should have gone with a different, less loaded convention, like maybe a leading o (e.g. "o755").

  • (cs) in reply to Bldsquirrel
    Bldsquirrel:
    da Doctah:
    00401 is a ZIP code (which happens to be for Pleasantville, New York, the home of Reader's Digest).

    So store it as a string? Again, stop and think about what you're doing. If the exact sequence of characters is what's important, not the numerical value, then it's not an integer. It's a string.

    Stop hacking, do things the right way, and save yourself a lot of effort.

    It's not hacking, it's inheriting a system from someone who didn't understand that just because something has digits in it doesn't make it a number.

    When I've had the opportunity to train new programmers, I explain that unless you plan on doing math with it, make it a string. Would you subtract one ZIP code from another? Increment a Social Security Number? Divide a credit card number by two?

    This is my small and largely ineffective way of trying to make the world a better place for generations of programmers yet unborn.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    Don't forget:
    #define number_base = 13;
    or it won't work.
    You're using the wrong definition of “won't work”, proving that while you understand mathematics, you have no understanding of the universe at all. Nice try (if derivative).
  • gaby (unregistered) in reply to Inno

    These are the "safe" ones ..

  • gaby (unregistered) in reply to Inno
    Inno:
    I was under the impression that 20, 23, 60, 250, 255, 500 etc. were literals too. Must be mistaken because compilers get literal numbers wrong!

    These are the "safe" ones ..

  • Jibble (unregistered)

    How much are we betting he was "burned" by typing in numbers with leading zeros (ie. octal)?

  • (cs) in reply to Rick
    Rick:
    Bananas:
    Steve The Cynic:
    The year was 1991, maybe 1992. It was an embedded system (without any file system, no less) with a four-line, twenty column text-mode LCD display.
    The Department of Redundancy department has fined you $2.00 dollars. You may make your payment at the nearest ATM machine.
    I would argue that it is possible for an embedded system to have a filesystem. Many printers have filesystems, but I would still say the software that runs the printer is 'embedded'. Am I wrong?
    Of course that's possible. And it is quite common, but it isn't universal, and the mention of embedded systems and file systems is a DailyWTF meme, so there. So, just for you, here's a "Whoooosh!"
  • L. (unregistered) in reply to da Doctah
    da Doctah:
    Bldsquirrel:
    J:
    Maybe to make them occupy the same number of columns, maybe to match file names which need to appear in the correct order when sorted alphabtically (000-FileName.txt, 001-FileName.txt, ... 999-FileName.txt)... who knows?

    This is one of those problems that, when it crops up, should be taken as a sign that you're doing things the wrong way in the first place.

    1 is a number. 00001 is a string.

    00401 is a ZIP code (which happens to be for Pleasantville, New York, the home of Reader's Digest). Excel allows the numeric format 00000 to prevent suppression of leading zeroes if you should happen to require ZIP codes in your data.

    Excel also has the biggest ever collection of data/presentation layers mixup / auto destruct failures.

  • (cs) in reply to Mcoder
    Mcoder:
    Steve The Cynic:
    It involved two different versions of the Solaris native compiler. One would accept code like this:

    FunkyCharacterBufferClass variable;

    ...

    printf("%s\n", variable); // Note no & on the variable

    (This is undefined behaviour, passing an non-POD object to the ellipsis part of an varargs function. The previous version of the compiler silently passed the address of the variable, exactly as if the & was there.)

    At least on C99 it is has a defined behaviour.

    You can define classes in C99? ((OK, it's my fault, I should have mentioned that the language was C++. I take one fail point.))

  • (cs) in reply to Michael
    Michael:
    Kef Schecter:
    The real WTF here, however, was me. It took me three passes over the code before I noticed the leading zeroes.
    No, the real WTF was that C used leading zeroes for octal numbers when a prefix like 0o would have done just as well and caused everyone far fewer headaches. (After all, there was already 0x for hex).
    Why would people use leading 0s in code (other than when they want to specify Octal)?
    Imagine that you are using integers to represent page numbers. They are composites, represented on-screen as digit strings, and you just typed the valid page numbers in as a set of literal constants, but so that they will look like the numbers that appear on-screen:

    int valid_page_numbers[] = { 0000, 0001, 0002, // etc.

    Got it now?

  • L. (unregistered) in reply to da Doctah
    da Doctah:
    Bldsquirrel:
    da Doctah:
    00401 is a ZIP code (which happens to be for Pleasantville, New York, the home of Reader's Digest).

    So store it as a string? Again, stop and think about what you're doing. If the exact sequence of characters is what's important, not the numerical value, then it's not an integer. It's a string.

    Stop hacking, do things the right way, and save yourself a lot of effort.

    It's not hacking, it's inheriting a system from someone who didn't understand that just because something has digits in it doesn't make it a number.

    When I've had the opportunity to train new programmers, I explain that unless you plan on doing math with it, make it a string. Would you subtract one ZIP code from another? Increment a Social Security Number? Divide a credit card number by two?

    This is my small and largely ineffective way of trying to make the world a better place for generations of programmers yet unborn.

    Well yes .. but no If you start storing numeric values as varchar or using them as strings in your application when they can only have numeric values, ... you should probably avoid giving advice ;)

  • (cs) in reply to Herby
    Herby:
    Constants! Constants?? Fortran!! <main> CALL SUB (1.0, 2.0) ... <subroutine> SUBROUTINE SUB (A, B) A=2.0 B=7.0 RETURN END

    Works wonders for generating bugs.

    It depends. On old IBM Fortran systems, yes, you can modify the values of 1.0 and 2.0, but on some other systems, e.g. Solaris-on-Sparc, you will crash out as the constants are placed in memory marked read-only.

  • c (unregistered) in reply to J
    J:

    I find it a little ridiculous that we're still using Latin in English sentences, e.g. "e.g.", "[sic]", "i.e.", "per se", "etc.", etc.

    I concur: all these exotic constructs are surplus to requirements.;-)

Leave a comment on “Tired of Getting Burned”

Log In or post as a guest

Replying to comment #:

« Return to Article