English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

what are readln an writeln for?

2007-01-14 17:18:22 · 4 answers · asked by NVPK 1 in Computers & Internet Programming & Design

4 answers

readln = Read a line
writeln = Write a line

This could be for a printer, display, file.....

Why in the world do you need pascal? That was old when I was young! BTW I am over 50 so I ain't young no more!

2007-01-14 17:23:17 · answer #1 · answered by afreshpath_admin 6 · 0 0

readln and writeln are used for reading and writing text streams that are delimited by a newline character. For example, if you have a text file with the following lines:

This land is your land
This land is my land
From California

Each call to readln will return the next line regardless of length; the readln function stops reading the input file when it reaches a newline character (which you can't see without a hex editor). In contrast, if you use the read() function, then you have to pass in the number of characters you want read from the input file.

Congrats on studying Pascal. It remains one of the best languages for studying structured programming. And if you're looking for a free Pascal compiler, see the link below.

2007-01-15 01:43:31 · answer #2 · answered by rongee_59 6 · 0 0

The readln function is used to read in data, for example, from the information the user provided to the program.

The writeln function is used to display data to the user.

2007-01-15 01:36:14 · answer #3 · answered by aclchan 2 · 0 0

a writeln statement is where the program displays something on the screen
a readln statement is where the program wants the user to type something in

2007-01-15 01:23:42 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers