Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/String-length/Component-Pascal/string-length-2.pas
Normal file
15
Task/String-length/Component-Pascal/string-length-2.pas
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
MODULE TestLen;
|
||||
|
||||
IMPORT Out;
|
||||
|
||||
PROCEDURE DoByteLength*;
|
||||
VAR s: ARRAY 16 OF CHAR; len, v: INTEGER;
|
||||
BEGIN
|
||||
s := "møøse";
|
||||
len := LEN(s$);
|
||||
v := SIZE(CHAR) * len;
|
||||
Out.String("s: "); Out.String(s); Out.Ln;
|
||||
Out.String("Length of characters in bytes: "); Out.Int(v, 0); Out.Ln
|
||||
END DoByteLength;
|
||||
|
||||
END TestLen.
|
||||
Loading…
Add table
Add a link
Reference in a new issue