Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Posts
    280

    Unanswered: How does this code works?

    if RecordNumber mod 2 = 1 then
    silver
    else
    white
    end if

    I have try to get some answer to this with the search engine but no luck. I know that "Mod" meaning remainder, I think. Please help explain the code above for me, thanks!

  2. #2
    Join Date
    Sep 2004
    Posts
    3
    That code will simply make every even row white and every odd row silver.

    Basically it is using the Mod operator to determine if the row is divisible by 2 (i.e. even if the remainer is 0, odd if remainer is 1).

    HTH.

Posting Permissions

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