4 ms·
There does seem to be some type inference going on though "auto a; a= 'hi!';", or maybe it's just defaulting to an int/pointer type? If it is type inference it
by flukus 5y ago
There does seem to be some type inference going on though "auto a; a= 'hi!';", or maybe it's just defaulting to an int/pointer type? If it is type inference it would have been awful to have the variable declaration at the top but the type declaration strewn through the function.
So it looks as though C switched from default static to default auto? I wonder if the programmers of the time sneered at the waste this added?
- obviouslynotme 5y agoThere are no types in B, only words. Auto denotes storage.
- wbkang 5y agoYes, for example, in old C the type was implicitly int unless mentioned. "Long" means long int" ;)