HP Pascal/iX Programmer's Guide (31502-90023)

5-: 26
The formula for the number of bytes allocated to a string is:
Example
VAR
s1 : string[10];
s2 : string[7];
The string s1 takes 16 bytes:
(((4 + 10 + 1) + 3) DIV 4) * 4 =
(18 DIV 4) * 4 =
4 * 4 = 16
The allocation is:
The string s2 takes 12 bytes:
(((4 + 7 + 1) + 3) DIV 4) * 4 =
(15 DIV 4) * 4 =
3 * 4 = 12
The allocation is: