Okay, I got a school assignment and got a problem here.
It says that:
D:\Skola\Programmering A\Inlämningsuppgifter\inlupp_2\Inlupp_2.pas:5: parse error before `:='
I know there's wrong with the array, but I want the user to write how many letters his/her name contains so that the array can take each letter out later to make it spelled backwards or something (if it's possible)
I'm a noob on this and I really want to learn, but this error is one I've never gotten before.
Code (HTML'ed so it's easier to read):
PROGRAM inlupp2;
{small bolded letters are "mini" local programs and big bold letters are the "Global" program}
{Here's the resources for my program}
USES
{Get's me some commands to give colours and clear screen etc.}
crt;
VAR
{Variables in my program}
i,firstnamelettercount:integer;
{An array in my program}
firstnameletters:array[1..firstnamelettercount] of integer;
{Here the main program starts}
BEGIN
Writeln('Welcome to Patrik "Loyen" Freijs latest program.');
Delay(2000);
writeln;
writeln('We will start with some questions so we know WHO you are.');
Delay(3000);
writeln;
write('We will start off with');
Delay(1000);
write(' how many letters does your first name contain? ');
{Here we makes the user write in an answer for "firstnameletters"}
readln(firstnamelettercount);
write('Your name includes ',firstnamelettercount,'. Now tell us your name.');
readln;
END.
Please help this swedish noob!
*updated code*