Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with code for scheduling
Message
From
05/09/2002 10:26:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/09/2002 10:00:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00697040
Message ID:
00697054
Views:
20
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform