I dont know if Im far off with this, The user enters their name and I want them to only enter in a string so if they enter in a number Id like an error message, any ideas?

program Word;
uses crt;
   var
      letter: string;
   begin
      clrscr;
      Repeat
         writeln('What is your name? ');
         readln(letter);
         if (letter >=UPCASE('a')) AND (letter <=UPCASE('z')) then
         begin
            writeln('Correct Answer ');
         end
         else
         begin
            writeln('Word needs to be entered');
            end;
      Until (letter >=UPCASE('a')) AND (letter <=UPCASE('z'));
      {-------------------Printing Results------------------}
      writeln('The name is ', letter);
      readln;
   end.

why not u use array in ...so if user enter in that array..u show the error message...

Interesting..good thinking thanks.. but would that not still limit the answer to just being an integer tho?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.