An if list website

Discussion in 'Mac Programming' started by macbooker15, Jul 13, 2009.

  1. macbooker15 macrumors 6502

    Jan 19, 2008
    Hello! I'm over here!
    Is there any kind of website or service that provides any kind of database of commonly used if statement lists? For example converting letter grades to GPAs in a home brew grading application? Or assigning each letter of the alphabet to a specific number? Because if there isn't, I'm thinking of starting one. Users would go onto the website and search for a specific kind of if list in a specific language and could get said list and copy into there program. What are your comments or suggestions if i just suck at googling and something like this already exists.
  2. Cinder6 macrumors 6502


    Jul 9, 2009
    Never heard of one, but wouldn't most of the "common" ones be pretty trivial? Your examples are, at least--especially the second one, because letters already have numbers associated with them :)

    What about, instead of common if clauses, just common tasks? That'd give it more scope, and it'd probably wind up more useful.
  3. GorillaPaws macrumors 6502a


    Oct 26, 2003
    Richmond, VA
    Take a look at Code Beach.
  4. autorelease macrumors regular

    Oct 13, 2008
    Achewood, CA
    Long "if lists" are usually a sign of bad code. Use switch statements, tables, and other techniques when possible.

Share This Page