I do not insist on the nonsense itself. However, I persist in reiterating it until I am certain that the answer entails no misconception about what I am suggesting. I am now convinced, as there is no incorrect assumption in your reply.
Spoiler: Still...
I still do not find it nonsensical, I find it similar to the concept of interfaces in C#. Several functions present themselves in a uniform fashion, accepting the same input and fulfilling the same requirements (return an int). I see a lot of such definitions where some of the implementations have constant return values because the outcome is known beforehand, but return values are used because the "client" programmer is not required to know which particular implementation he is working with.
"Return the number of copied characters for all 3 versions and be done with it."
Noted. Moving on.
The next question: What would we use internally in zdoom? How much is this function worth if it works by copying characters from a string to a an array of 32-bit integers through a C++ loop? Fewer pcodes (light reduction on memory use and evaluations)?
What are our chances and benefits of using a real strcpy or memcpy?
I'm taking a look at the array storage types now, to see what answers I myself come up with. If we find a means to use real strcpy, we also need to make the data usable afterwards. Array printing assumes one character per int.
EDIT: World/global array is TMap sorted on integer key? We'll probably have to stick to the iterated assignment of char to int. Level-arrays seem more workable, but that doesn't mean there's a good way to use actual strcpy.
I do not insist on the nonsense itself. However, I persist in reiterating it until I am certain that the answer entails no misconception about what I am suggesting. I am now convinced, as there is no incorrect assumption in your reply.[spoiler=Still...]I still do not find it nonsensical, I find it similar to the concept of interfaces in C#. Several functions present themselves in a uniform fashion, accepting the same input and fulfilling the same requirements (return an int). I see a lot of such definitions where some of the implementations have constant return values because the outcome is known beforehand, but return values are used because the "client" programmer is not required to know which particular implementation he is working with.[/spoiler]
"Return the number of copied characters for all 3 versions and be done with it."
Noted. Moving on.
The next question: What would we use internally in zdoom? How much is this function worth if it works by copying characters from a string to a an array of 32-bit integers through a C++ loop? Fewer pcodes (light reduction on memory use and evaluations)?
What are our chances and benefits of using a real strcpy or memcpy?
I'm taking a look at the array storage types now, to see what answers I myself come up with. If we find a means to use real strcpy, we also need to make the data usable afterwards. Array printing assumes one character per int.
EDIT: World/global array is TMap sorted on integer key? We'll probably have to stick to the iterated assignment of char to int. Level-arrays seem more workable, but that doesn't mean there's a good way to use actual strcpy.