3 ms·
So in a sense implementing Pascal strings in C?
by timClicks 9y ago
So in a sense implementing Pascal strings in C?
- flukus 9y agoYes. But also "abusing" C's permissiveness with pointers to get pascal strings that interop with standard functions. It get's passed around as a pointer to a char array but the length function would return the value at that pointer - sizeof(size_T). In most languages this wouldn't be possible.