Midterm Project Assistance

I am working on my midterm project for my beginners coding class. I have divided many parts into separate functions. I have come to a point where I need to reference some integer variables that were entered earlier. However the way it is set up now, every time I make a call back to where the variable is it will need me to re-enter a value for it. Are there any good ways to fix this? I currently have it set up where I tried using universal variables and setting them equal to the variables I need. Please help if you can. Also please try to keep any explanations simple if possible, so that I can understand it.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
#include<iostream>
#include<math.h>
#include<cstdlib>
#include<fstream>

using namespace std;
int dayNum;
int timeNum;

int GetInput()
{
	int choice;
	cin >> choice;
	return choice;

	int day;
	cin >> day;
	return day;
	dayNum = day;

	int time;
	cin >> time;
	return time;
	timeNum = time;
}

void Beginning()
{
	cout << "\t---------------------------------\n"
		 << "\t|            Welcome            |\n"
		 << "\t|              to               |\n"
		 << "\t|            Murphy's           |\n"
		 << "\t|            Roadkill           |\n"
		 << "\t|              Cafe             |\n"
		 << "\t---------------------------------\n\n";
	cout << "Hey there! My name is Murphy. Welcome to my cafe.\n";
	cout << "1 - Start\n";
	cout << "2 - Exit\n";
}

void OpenCloseDay()
{
	cout << "What day is today again?\n";
	cout << "1 - Sunday\n"
		 << "2 - Monday\n"
		 << "3 - Tuesday\n"
		 << "4 - Wednesday\n"
		 << "5 - Thursday\n"
		 << "6 - Friday\n"
		 << "7 - Saturday\n"
		 << "8 - Back\n";
}

void WeekendPrompt()
{
	cout << "Ahhhhhhh!  So it is the weekend!\n";
	cout << "So what time is it? (PLease enter time in 24hr format)\n";
}

void WeekdayPrompt()
{
	cout << "Ahhhhhhh!  So it is a weekday!\n";
	cout << "So what time is it? (Please enter time in 24hr format.)\n";
}

void OpenMenu()
{
	cout << "So what can I do for you?  We've got food, music, and cool knick-knacks in the gift shop.\n";
	cout << "1 - Order Food\n"
		<< "2 - Play Some Music\n"
		<< "3 - Look Aroung the Gift Shop (Mon - Fri : 800 - 2000)\n\t\t\t\(Sat & Sun : 700 - 2200)\n"
		<< "4 - Back\n";
	system("PAUSE");
}

void CafeOp()
{
		cout << "wold you like to order breakfast or lunch/dinner\n";
}

void JukeBoxOp()
{

}

void GiftShopOp()
{
	
}

void GiftShop()
{
	if (timeNum >= 800 && timeNum <= 2000)
	{
		int choice = 0;

		do
		{
			system("cls");
			GiftShopOp();
			choice = GetInput();
			switch (choice) {
			case 1:
				cout << "hi\n";
			case 2:
				break;
			}
		} while (choice != 2);
	}
	else
		cout << "sorry but we are closed\n";
	system("PAUSE");
}

void JukeBox()
{
	cout << timeNum << "\n" << dayNum << endl;
	system("PAUSE");
}

void Cafe()
{
	CafeOp();
	system("PAUSE");
}

void Open()
{
	int choice = 0;

	do
	{
		system("cls");
		OpenMenu();
		choice = GetInput();
		switch (choice) {
		case 1:
			Cafe();
			break;
		case 2:
			JukeBox();
			break;
		case 3:
			GiftShop();
			break;
		case 4:
			break;
		}
	} while (choice != 4);
}

void Weekday()
{
	int time = 0;

		system("cls");
		WeekdayPrompt();
		time = GetInput();
		if (time >= 0 && time < 500)
		{
			cout << "Sorry we aren't open yet.\n";
		}
		else if (time >= 2300 && time <= 2400)
		{
			cout << "Sorry we are closed for the day.\n";
		}
		else if (time >= 500 && time <= 2300)
		{
			cout << "Congrats!  We are open for now.\n";
			Open();
		}
		system("PAUSE");
	
}

void Weekend()
{
	int time = 0;

	system("cls");
	WeekdayPrompt();
	time = GetInput();
	if (time >= 0 && time < 500)
	{
		cout << "Sorry we aren't open yet.\n";
	}
	else if (time >= 2300 && time <= 2400)
	{
		cout << "Sorry we are closed for the day.\n";
	}
	else if (time >= 500 && time <= 2300)
	{
		cout << "Congrats!  We are open for now.\n";
		Open();
	}
	system("PAUSE");

}

void Day()
{
	int day = 0;

	do
	{
		system("cls");
		OpenCloseDay();
		day = GetInput();
		switch (day) {
		case 1:
			Weekend();
			break;
		case 2:
			Weekday();
			break;
		case 3:
			Weekday();
			break;
		case 4:
			Weekday();
			break;
		case 5:
			Weekday();
			break;
		case 6:
			Weekday();
			break;
		case 7:
			Weekend();
			break;
		case 8:
			break;
		default:
			cout << "Not sure what you mean by that buddy.\n";
			system("PAUSE");
			break;
		}
	} while (day != 8);
}


int main()
{

	int choice = 0;
	char ans;
	do
	{
		system("cls");
		Beginning();
		choice = GetInput();
		switch (choice) {
		case 1:
			Day();
			break;
		case 2:
			cout << "Are you sure? (Y/y = yes || N/n = no)\n";
			cin >> ans;
			while (ans != 'Y' && ans != 'y' && ans != 'N' && ans != 'n')
			{
				cout << "Not A valid answer.\n";
				cout << "Are you sure? (Y/y = yes || N/n = no)\n";
				cin >> ans;
			}
				if (ans == 'Y' || ans == 'y')
					break;
			else {
				choice = 0;
				break;
			}
		default:
			cout << "What do you mean?\n";
			system("PAUSE");
			break;
		}
	} while (choice != 2);
	system("PAUSE");
	return EXIT_SUCCESS;
}
Hello RCUniversal,

I have come to a point where I need to reference some integer variables that were entered earlier. However the way it is set up now, every time I make a call back to where the variable is it will need me to re-enter a value for it. Are there any good ways to fix this?

It is best to define your variables in main and stay away from global or, universal variables you call them, Then in functions that you may need these variables pass them by reference. Another option would be to make the variable in a function "static" so it is not lost when the function goes out of scope.

Given the function:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
int GetInput()
{
	int choice;
	cin >> choice;
	return choice;

	int day;
	cin >> day;
	return day;
	dayNum = day;

	int time;
	cin >> time;
	return time;
	timeNum = time;
}


How do you expect this to work? Line 5 will leave the function and the rest of the code will never be reached.

Given the instruction So what time is it? (Please enter time in 24hr format.) I will enter the time as "08:00" which will not work for what you have set up. You will need to handle the time differently or revise the prompt to let the user know exactly what you want.

The use of system("cls"); or "pause" is not the best way to do this. Using "system" anything is a bad idea. Do a search on "system" or "using system", "system pause" and see what you can find. If you have not read this yet it is worth some time http://www.cplusplus.com/forum/beginner/1988/ Your use of "system pause" is little to much. There are some places where there shouldd be no pause and the program should be allowed to continue, e.g., when you enter a number to back out of someplace.

You mentioned that you needed the value of a variable entered in a function and was lost when the function ends. What variables do you mean? I am not having an easy time finding these variables.

The program could use some improvement, but appears to work somewhat for now.

Hope that helps,

Andy
Andy,

Actually everything in the program works exactly how I need it to right now up until I need The values for the variables again. The global variables are shown at the very beginning of the code. They are dayNum and timeNum. They need to equal what I put in for day and time respectively so that I can store the values somewhere else and then call just the values to a different function. I have been told to use reference to pass them but I do not understand how to do that. Some system pauses in the program are needed. Which ones arent?

P.S. - the time is supposed to be entered as 24hr format without the colon

RCUniversal
Last edited on
Hello RCUniversal,

"dayNum" and "timeNum" are global variables ad defined where they should be except you never use them. The function "GetInput" will never change these variables, see previous message.

Passing a variable by reference is: return type FunctionName(type& variable). The use of & tells the function that the variable is a reference. If you have a proto type this needs to match the function definition. I am not sure of all the functions where you would need the variables for day and time, but the global variables you have defined will cover this need. What you need is some place in the program to give them a value to use.

Some system pauses in the program are needed. Which ones aren't?

Any pause when backing out of a section is not needed. Any time you see "Press any key to continue . . . and another fallows, the second one is not needed. Like at the opening menu when you press 2 and say "Y" the program should end not wait for a key press. Places like that. I have not tracked down all unneeded places yet. Time and experience will help you here.

Consider this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
int GetInput()
{
	int choice;
	cin >> choice;
	return choice;

	int day;
	cin >> day;
	return day;
	dayNum = day;

	int time;
	cin >> time;
	return time;
	timeNum = time;
}


The compiler will read the file in a top down method one line at a time. Keeping that in mind and starting at line 3, this will define the variable "choice" and reserve storage space for it. Always a good idea to initialize the variables when defined even if the next line will give it a value.

Lines 7, 8 and 9 are the same as above. line 10 will never be reached because of line 9 and first because of line 5.

Lines 12 - 15 same as above.

To use a function like this you would have to pass a variable to use to decide which part of the function to use with either a switch or if statements.
The "Weekday" and "Weekend" functions do not work well. You want an "int" for the time, but ask the user in a way that would expect a string. "time" will take everything up to the ":" leaving the rest and this is not what you want. Either take in a string and separate it into hours and minutes or enter for two variables, hours and minutes.

Hope that helps,

Andy
Passing a variable by reference is: return type FunctionName(type& variable). The use of & tells the function that the variable is a reference. If you have a proto type this needs to match the function definition. I am not sure of all the functions where you would need the variables for day and time, but the global variables you have defined will cover this need. What you need is some place in the program to give them a value to use.


So where in the code would I need to put the return function. Also so are you now saying to go ahead and leave the global variables in the code?

Still confused and stressed,
RCUniversal
Hello RCUniversal,

So where in the code would I need to put the return function.

That is up to you. What I showed you is an example not something that you need.

I have mentioned the "GetInput" function twice. This is a function that needs work because only the first section will work.

The two variables
1
2
int dayNum;
int timeNum;

Right now they are global variables which means that the whole file has access to them. This is not a good idea because they can be changed anywhere in the program whether you mean to or not . They are better off defined in main and passed to functions when needed. By reference if they need to be changed or by const value otherwise.

The functions"Weekday" and "Weekend" look like a good place to give the variables "dayNum" and "timeNum" a value. Either making use of the "GetInput" function or something else.

Also so are you now saying to go ahead and leave the global variables in the code?

You can leave these as global variables, but as I said earlier it is not a good idea.

Global variables are useful if they start with "const" or the newer version"constexpr" neither of which are useful here. As a "const" variable if you try to change them in the program the compiler will complain.

You have some functions that are not yet complete, so I do not know where you would intend to use the variables "dayNum" and "timeNum". It is hard to say what to do with them until I see how you intend to use them.

There are some things I want to try with the "GetInpput" function to see how it could work and to make more use of what is there.

Hope that helps,

Andy
I need to use the two variable in cafe and in giftshop. There I need to use them in if statements to determine what can be served in the cafe and wether or not the gift shop is open.

You say I can put the pass by const anywhere, but I am asking if it goes in the function you want the variables to be passed to, the function you are passing them from, or from outside any funtion.

RCUniversal
Last edited on
Hello RCUniversal,

Since "dayNum" and "timeNum" are global variables you do not need to pass anything because the whole file has access to these variables.

As an example, if "dayNum" and "timeNum" were defined in main, the function call would be:
GiftShop(dayNum, timeNum);
and the function definition would be:
void GiftShop(const int dayNum, const int timeNum).
Where "const" means that you do not want to change these variables in the function. Right now you do not have to worry about this because of the global variables. This would work for other variables that are defined in main and used by other functions.

The use of "const" on a variable is in the function definition and the function proto type if used.

I have worked with the program for awhile and came to the conclusion that "GetInput" only needs to be this:
1
2
3
4
5
6
int GetInput()
{
    int choice;
    std::cin >> choice;
    return choice;
}

As I worked with I notice that any call to "GetInput" returned the input to a variable that was used in main or other functions. In the functions that use "day = Getinput();" This would be followed with "dayNum = day". This could be better written as dayNum = GetInput(); and then use "dayNum" in the function instead of "day". The same applies to "timeNum".

Hope that helps,

Andy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
#include<iostream>
#include<math.h>
#include<cstdlib>
#include<fstream>
#include<iomanip>

using namespace std;

int dayNum;
int timeNum;

int GetInput()
{
	int choice;
	cin >> choice;
	return choice;
}

int GetDay()
{
	int day;
	cin >> day;
	dayNum = day;
	return day;
}
	
int GetTime()
{
	int time;
	cin >> time;
	timeNum = time;
	return time;
}

void Beginning()
{
	cout << "\t---------------------------------\n"
		 << "\t|            Welcome            |\n"
		 << "\t|              to               |\n"
		 << "\t|            Murphy's           |\n"
		 << "\t|            Roadkill           |\n"
		 << "\t|              Cafe             |\n"
		 << "\t---------------------------------\n\n";
	cout << "Hey there! My name is Murphy. Welcome to my cafe.\n";
	cout << "1 - Start\n";
	cout << "2 - Exit\n";
}

void OpenCloseDay()
{
	cout << "What day is today again?\n";
	cout << "1 - Sunday\n"
		 << "2 - Monday\n"
		 << "3 - Tuesday\n"
		 << "4 - Wednesday\n"
		 << "5 - Thursday\n"
		 << "6 - Friday\n"
		 << "7 - Saturday\n"
		 << "8 - Back\n";
}

void WeekendPrompt()
{
	cout << "Ahhhhhhh!  So it is the weekend!\n";
	cout << "So what time is it? (PLease enter time in 24hr format)\n";
}

void WeekdayPrompt()
{
	cout << "Ahhhhhhh!  So it is a weekday!\n";
	cout << "So what time is it? (Please enter time in 24hr format.)\n";
}

void OpenMenu()
{
	cout << "So what can I do for you?  We've got food, music, and cool knick-knacks in the gift shop.\n";
	cout << "1 - Order Food\n"
		<< "2 - Play Some Music\n"
		<< "3 - Look Aroung the Gift Shop (Mon - Fri : 800 - 2000)\n\t\t\t\(Sat & Sun : 700 - 2200)\n"
		<< "4 - Back\n";
	system("PAUSE");
}

void CafeOp()
{
		cout << "wold you like to order breakfast or lunch/dinner\n";
}

void JukeBoxOp()
{

}

void GiftShopOp()
{
	cout << "Hi there! My name is Stacy.  I run the gift shop.\n";
	cout << "would you like to go inside?\n"
		<< "1 - Yes\n"
		<< "2 - No\n";
}

void GiftShop()
{
	int choice = 0;
	do
	{
		system("cls");
		GiftShopOp();
		dayNum = GetDay();
		timeNum = GetTime();
		switch (choice) {
		case 1:
			if (dayNum == 1 || dayNum == 7)
			{
				if (timeNum >= 700 && timeNum <= 2200)
				{
					cout << "Hi! Welcome to the Gift Shop!\n";
				}
			}
			else if (dayNum == 2 || dayNum == 3 || dayNum == 4 || dayNum == 5 || dayNum == 6)
			{
				if (timeNum >= 800 && timeNum <= 2000)
				{
					cout << "Hi! Welcome to the Gift Shop!\n";
				}
			}
			else
				cout << "Sorry but the Gift Shop is closed for now.\n";
			break;
		case 2:
			break;
		default:
			cout << "Thats not really an answer.\n";
		}
	} while (choice != 2);
}

void JukeBox()
{
	cout << "" << "\n" << "" << endl;
	system("PAUSE");
}

void Cafe()
{
	CafeOp();
	system("PAUSE");
}

void Open()
{
	int choice = 0;

	do
	{
		system("cls");
		OpenMenu();
		choice = GetInput();
		switch (choice) {
		case 1:
			Cafe();
			break;
		case 2:
			JukeBox();
			break;
		case 3:
			GiftShop();
			break;
		case 4:
			break;
		}
	} while (choice != 4);
}

void Weekday()
{
	int time = 0;

		system("cls");
		WeekdayPrompt();
		time = GetTime();
		if (time >= 0 && time < 500)
		{
			cout << "Sorry we aren't open yet.\n";
		}
		else if (time >= 2300 && time <= 2400)
		{
			cout << "Sorry we are closed for the day.\n";
		}
		else if (time >= 500 && time <= 2300)
		{
			cout << "Congrats!  We are open for now.\n";
			Open();
		}
		system("PAUSE");
	
}

void Weekend()
{
	int time = 0;

	system("cls");
	WeekdayPrompt();
	time = GetTime();
	if (time >= 0 && time < 500)
	{
		cout << "Sorry we aren't open yet.\n";
	}
	else if (time >= 2300 && time <= 2400)
	{
		cout << "Sorry we are closed for the day.\n";
	}
	else if (time >= 500 && time <= 2300)
	{
		cout << "Congrats!  We are open for now.\n";
		Open();
	}
	system("PAUSE");

}

void Day()
{
	int day = 0;

	do
	{
		system("cls");
		OpenCloseDay();
		day = GetDay();
		switch (day) {
		case 1:
			Weekend();
			break;
		case 2:
			Weekday();
			break;
		case 3:
			Weekday();
			break;
		case 4:
			Weekday();
			break;
		case 5:
			Weekday();
			break;
		case 6:
			Weekday();
			break;
		case 7:
			Weekend();
			break;
		case 8:
			break;
		default:
			cout << "Not sure what you mean by that buddy.\n";
			system("PAUSE");
			break;
		}
	} while (day != 8);
}


int main()
{

	int choice = 0;
	char ans;
	do
	{
		system("cls");
		Beginning();
		choice = GetInput();
		switch (choice) {
		case 1:
			Day();
			break;
		case 2:
			cout << "Are you sure? (Y/y = yes || N/n = no)\n";
			cin >> ans;
			while (ans != 'Y' && ans != 'y' && ans != 'N' && ans != 'n')
			{
				cout << "Not A valid answer.\n";
				cout << "Are you sure? (Y/y = yes || N/n = no)\n";
				cin >> ans;
			}
				if (ans == 'Y' || ans == 'y')
					break;
			else {
				choice = 0;
				break;
			}
		default:
			cout << "What do you mean?\n";
			system("PAUSE");
			break;
		}
	} while (choice != 2);
	system("PAUSE");
	return EXIT_SUCCESS;
}

This is what I currently have. for some reason it is having issues when I tell it to go to GiftShop();. Any idea why it is doing that?

RCUniversal
One tiny pedantic thing:

1
2
#include<math.h>
#include<cmath> 


None of the STL headers have a .h in them, cmath is the C++ version of the math header.

I have a pathological hatred for statements like this:

1
2
while (ans != 'Y' && ans != 'y' && ans != 'N' && ans != 'n')
			{


Cut the logic in half by using toupper or tolower, then you don't have to compare to both upper and lower case.

The switch statements should have a Quit option, the default case takes care of the bad input, so then you could have this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
bool Quit = false;

while (!Quit) { // keep looping unless we are quitting
// show message to explain what input is required. Should  be a function
// get user input could be a function
// validate input with a function

// switch with a Quit case
// ...

case 9: // user wants to quit
      Quit = true;
       // mesg to say we are quitting

default:  // takes care of bad input

}


That way we can avoid a dubious do loop. Just because a do loop always executes once, doesn't mean it should be used all the time. They should be fairly rare.
Last edited on
1
2
3
do {

} while (input !=2) ; // what if input is 1 ? 



for some reason it is having issues when I tell it to go to GiftShop();. Any idea why it is doing that?


Be explicit about what issues you are having, we are not in the professions of guessing or telepathy.
Last edited on
Run the code if you need to better understand what's going wrong. I have no idea so how would i explain it?
You are asking people to give up their time and effort, free of charge, to help you. That means it is incumbent on you to do as much as possible to explain your problem, and give us as much information as possible so that we can easily help you.

To refuse to explain your problem, and simply tell people to do more work by compiling and running your code, is a lazy and selfish abuse of people's generosity.
for some reason it is having issues when I tell it to go to GiftShop();. Any idea why it is doing that?

Yes. It’s doing that because you undervalued what Handy Andy explained you: you rely in global variables you don’t need.
Look at your code:
1
2
3
4
5
6
7
8
9
10
void GiftShop()
{
    int choice = 0;
    do
    {
        system("cls");
        GiftShopOp();
        dayNum = GetDay();
        timeNum = GetTime();
        switch (choice) {


a) You set ‘choice’ to zero.
b) Then you update your global variables to the returning value of a couple of functions - but your global variables are already updated inside that functions, and with exactly the same values.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int GetDay()
{
    int day;
    cin >> day;
    dayNum = day;
    return day;
}
    
int GetTime()
{
    int time;
    cin >> time;
    timeNum = time;
    return time;
}


c) However, both functions wait for user input, but the user is not informed s/he’s expected to type in something, hence they could wait forever.

d) Even after the user guesses s/he must enter a value to get on, that value happens to be pointless, since you ‘switch’ by another value, the one of ‘choice’, which is still zero...

e) ...but zero is not between the valid options, so the loop restarts - again, forever.
Hello RCUniversal,

Look at this bit of code and tell me what is wrong:

1
2
3
4
5
6
7
8
9
10
11
void GiftShop()
{
	int choice = 0;
	do
	{
		system("cls");
		GiftShopOp();
		dayNum = GetDay();  // <--- Correctly written, but not needed here.
		timeNum = GetTime();  // <--- Correctly written, but not needed here.

		switch (choice) {


What is the value of "choice" on line 10?

BTW "dayNum" and "timeNum" are global variables that should have been set long before you get here. As I said somewhere before in the "Weekday" and "Weekend" functions.

Hope that helps,

Andy
Topic archived. No new replies allowed.