Pascal Question?

Ns1

No Lifer
Jun 17, 2001
55,420
1,599
126
wtf is wrong with my code?

Const
NumberOfQuiz = 3; {Number of Quiz}
NumberOfHW = 3; {Number of HW Assignments}
NumberOfInClass = 2; {Number of In Class Assignments}
QuizWeight = .2; {Quiz Weight}
HWWeight = .2; {Homework Weight}
InClassWeight = .15; {In Class Weight}
MidtermWeight = .2; {Midterm Weight}
FinalWeight = .25; {Final Weight}
ECWeight = .5; {Extra Credit Weight}

When i try to compile, i get

104 / 22 homewo~1.pas
Error: Illegal expression

104 / 22 homewo~1.pas
Fatal: Syntax error, ; expected but ordinal const found


eh?
 

jpsj82

Senior member
Oct 30, 2000
958
0
0
well its been awhile since i have worked with pascal, but when you declare const do you need to declare it as some type. Example
Const
int NumberOfQuiz = 3;

like i said its been a while since i have worked with pascal, so the syntax might be wrong. But do you get the idea of declaring it as some type of const?