Length() in pascal

In Pascal, the Length() function is used to determine the number of characters in a string. It returns an integer value representing the length of the string. Here's an example of how to use the Length() function in Pascal:

program LengthExample;
  str: string;
  str := 'Hello, World!';
  writeln('Length of the string: ', Length(str));

In this example, the Length() function is used to find the length of the string str which contains the text "Hello, World!". The result is then printed to the console using the writeln() function.