logoalt Hacker News

Conscattoday at 6:39 AM1 replyview on HN

Clang and GCC both let you use Pascal strings in C if you would like (with `\p`). But Pascal strings aren't that useful today because the maximum length is too short.


Replies

jxbdbdtoday at 6:47 AM

Why would a pascal string be any shorter than a C string?

A C string is one pointer reaching all of memory, a Pascal string is two pointers reaching all of memory

show 2 replies