pascal中字符串的字符数

以下示例是关于Pascal中包含pascal中字符串的字符数用法的示例代码,想了解pascal中字符串的字符数的具体用法?pascal中字符串的字符数怎么用?pascal中字符串的字符数使用的例子?那么可以参考以下相关示例代码来学习它的具体使用方法。

[英]:number of characters of string in pascal源码类型:Pascal
Program StringLengthFunction;
 
Var 
sampleString:String;

begin
    Write('Enter a string: ');
    readln(sampleString);
    
    //Length function takes a string as input ansd returns its number of chracters as an integer
    Writeln('Length of string entered is: ',Length(sampleString));
End.

本文地址:https://www.itbaoku.cn/snippets/787514.html