>Hi,
>
>I’m having trouble with a program that schedules classes. The following are the requirements:
>
>A student is required to take 6 classes of a course and each class is sequential (really any number of classes)
>
>Course classes are offered 4 days a week (really one to seven times per week). Normally, mon, tues, wed, thur but could be sat, mon, wed, fri or any sequence of days during the week.
>
>The problem:
>
>I can’t figure out how to determine the date of the last class required. As in the student starts 09/09/2002 what would be the date of the last class. What it should be is 09/17/2002 in my test case.
>
>Can anyone help with a routine (or at least a direction) or maybe someone knows of a paper somewhere on the net.
>
>
>Thanks in Advance
>
>
>John
ldStart = {^2002/09/09}
lnCourses = 6
lcDays = '1234'
lnDays = 0
lnDone = 0
Dimension arrDays[lnCourses]
Do While lnDone < lnCourses
If Transform(Dow(ldStart+lnDays,2))$lcDays
lnDone = lnDone + 1
? 'Course day :', ldStart + lnDays
arrDays[lnDone] = ldStart + lnDays
Endif
lnDays = lnDays + 1
Enddo
Display Memory Like arrDays
Cetin