Sneaky Snippets (1): Infinity

I found this beaut in a Delphi system I co-wrote while studying:

const
  UNENDLICH = 99999999;

Please note that (in this case) unendlich is the german counterpart for infinity.

This looks worse than it actually was. The system was an LL(1) parser generator and in order to increase performance we used fixed-length arrays for all kinds of collections, and we had to set a maximum upper bound for array indices. Maybe we shouldn’t have called it infinity, though.

One Response to “Sneaky Snippets (1): Infinity”

  1. March 6th, 2007 | 9:50 am

    Reminds me somehow of the old statement: PI ~ 4.

Leave a reply

Warning: comments containing links will be eaten by our spam protection.