Results 1 to 2 of 2

Thread: example?

  1. #1
    Join Date
    Dec 1969

    Default example?

    on 2/27 I asked for some help regarding some coding logic:<BR>http://www.aspmessageboard.com/forum/asp.asp?M=553676&T=553676&F=20&P=1<BR><BR>Everyone was patient with me and finally got me what I needed which was basically this line:<BR>guyoncall = array(datepart("ww", Date()) Mod (ubound(&#060;array&#062;) + 1)) <BR><BR>In a nutshell Im trying to create a page which will display a different name every week. When the all the names have been used, it starts at the beginning. The array will be within the code.<BR><BR>The problem is that its a bit over my head and Im having problems getting it working correctly. I was curious if someone could please write a very brief example on how this is used. Thank you for any help you can provide.<BR><BR>R

  2. #2
    Join Date
    Dec 1969

    Default RE: example?

    array(datepart("ww", Date()) returns a number between 0 and something.<BR><BR>(ubound(&#060;array&#062;) + 1)) returns a number between 1 and the maximum number of elements in &#060;array&#062; +1<BR><BR>mod is the Modulus function. Remember when you learning division? Instead of the answer of 3/2 being 1.33333 the answer was 1 with a remainder of 1<BR><BR>Well 3 mod 2 is 1. Mod give the integer remainder. It is important in circular programming, like a clock.<BR><BR>

Posting Permissions

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