3 ms·
Sure, its just that these kind of strings were historically called Pascal-strings [0] because they were the way Pascal implemented strings. [0] And still are!
by dr_zoidberg 5y ago
Sure, its just that these kind of strings were historically called Pascal-strings [0] because they were the way Pascal implemented strings.
[0] And still are! For example, Python refers to them as such, see the "p" (lowercase p) character code here: https://docs.python.org/3/library/struct.html#format-strings https://docs.python.org/3/library/struct.html#format-strings
- pjmlp 5y agoNot all C++ string libraries use Pascal strings. Some of them use a fat pointer instead, with a mix of counter, pointer to the end, and null terminator for C compatibility.
- dr_zoidberg 5y agoThat's ingenious, but I don't think I've heard a name for those kind of strings.
- pjmlp 5y agoOne thing is certain, they aren't Pascal strings.