Free Pascal Program Tutorial 4 - User Input - Lazarus

Опубликовано: 13 Май 2012
на канале: SchoolFreeware
94,981
546

http://www.schoolfreeware.com

To have the computer receive input from the user the command readln (or its variation read) will collect the data. Also, the variable with the data type must be declared.

Example:

var
name:string;


  write('Enter Name: ');
  readln(name);


The computer will collect the data from the user and this line will output the data to the screen.


  writeln('Nice To Meet You, ', name);