Re:Checked C
by WalterBright on Wednesday December 21, 2022 @03:15PM
(#34085835)
Create an adapter:
Strings can be done like this:
[ Parent
| on HN ]
Hmmm, the "[..]" is a fat pointer right? Couldn't you just say:
int main(char [..] args)
Maybe with some way to tell the compiler the correct parameter order if needed? Perhaps: int main(char [..argc] argv)
I'm curious if ELF and other formats have enough info to figure that mapping out?
Re:Checked C
by WalterBright on Wednesday December 21, 2022 @03:55PM
(#34086261)
> the "[..]" is a fat pointer right?
yes
> if ELF and other formats have enough info to figure that mapping out?
No, as there is no semantic connection between `argc` and `argv`.