4 ms·
https://github.com/mortdeus/legacy-cc/blob/ccbe90a2803e2cc7e177c77cf1d5c19dd13f6d02/last1120c/cvopt.c#L35 https://github.com/mortdeus/legacy-cc/blob/ccbe90a2803
by tirrex 6y ago
https://github.com/mortdeus/legacy-cc/blob/ccbe90a2803e2cc7e177c77cf1d5c19dd13f6d02/last1120c/cvopt.c#L35 https://github.com/mortdeus/legacy-cc/blob/ccbe90a2803e2cc7e...
“auto” exists in the initial version.
- volta83 6y agoAnd what does it mean there? (automatic storage duration)
- tirrex 6y agoDo you mean automatic type deduction? Edit : I know it’s also storage specifier but it also does type deduction here, hope I’m not confused with the terminology
- volta83 6y agoIt doesn't do type deduction there. In original C you could declare variables without a type, and these variables with auto have no type. So this "auto" is essentially saying "this variable without a type uses automatic storage". That's a completely different language feature from "deduce the type of this variable".
- nix-zarathustra 6y agoNo, it doesn't do type deduction. Without specifying the type, it assumes a type of int. Everything in C revolves around ints.
- jcelerier 6y agohere it means automatic storage duration
- jstanley 6y agoIt means it lives on the stack, so it "exists" until the function returns.
- wruza 6y agoThat is true, but more nuanced. https://www.tutorialspoint.com/cprogramming/c_storage_classes.htm https://www.tutorialspoint.com/cprogramming/c_storage_classe...