: : : : But this is illegal in pascal, what should be the correct syntax?
: : : :
: : : : This is for the checking of my crossword,
: : : : I want to have something like that:
: : : : ------------------------------------
: : : : score:=0;
: : : : if for x := 2 to 6 do
: : : : table[x,2] = answer[x,2] then
: : : : score:=score+1;
: : : : ------------------------------------
: : : : urgent!could anyone help ?
: : : : ps.what i want to have in my program is to check the "whole" word first
: : : : then if the whole "word" is correct,score+1;
: : : : table[x,y] & answer[x,y] are char.
: : : :
: : : Only the word "if" is wrong in that piece of code. It should be:
: : :
: : : for x := 2 to 6 do
: : : if table[x,2] = answer[x,2] then
: : : score:=score+1;
: : :
: : :
: : :
: :
: : This is not what i want, the score will be very large(every letters in each word is counted as one mark).
: : I just want 1 mark for a 'whole' word.Please help,urgent><
: :
: Then here is the code to use:
:
: WordCorrect := true; { Assume the word is correct }
: for x := 2 to 6 do { Check the word }
: if table[x,2] <> answer[x,2] then { if an error is found }
: WordCorrect := false; { Word is wrong }
: if WordCorrect then
: score := score + 1; { Increase score for a correct word }
:
:
:
thanks