Results 1 to 10 of 10

Thread: GAH!!!! Too much tinkering and I've broke it. Help!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Code:
    4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,24,
             25,26,27,28,29,30
    Why do you do this?

    Please do it like this:
    Code:
    4..30
    Also your code indentation is very counter-intuitive:
    Code:
          if (yearNo <=99) and(yearNo >12) then
            write(' 19',yearNo);
              if (yearNo <=09) and (yearNo >=00) then
                write(' 200',yearNo);
                  if (yearNo =10) and (yearNo <=12) then
                    write(' 20',yearNo);
    Should be:
    Code:
      if (yearNo <=99) and(yearNo >12) then
        write(' 19',yearNo);
      if (yearNo <=09) and (yearNo >=00) then
        write(' 200',yearNo);
      if (yearNo =10) and (yearNo <=12) then
        write(' 20',yearNo);
    I think that the format() function will also help you to print your date more easily. The sollution with tons of If statements is just messy IMHO.

    Last edited by chronozphere; 20-04-2011 at 02:47 PM.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •