r/C_Programming • u/ouyawei • Jan 28 '18
Article How Old School C Programmers Process Arguments
http://www.usrsb.in/How-Old-School-C-Programmers-Process-Arguments.html
76
Upvotes
r/C_Programming • u/ouyawei • Jan 28 '18
24
u/kbob Jan 28 '18
K or R was writing it out longhand so beginners could follow easier. Otherwise, it would have been more like this.
4
u/[deleted] Jan 28 '18
woah, that's quite impressive. these days, i'd usually just use
getopt()for something like that...15
u/donpek Jan 28 '18
Old-school? As far as I know, any decent C programmer still ends up writing code like this.
2
u/MaltersWandler Jan 28 '18
The Plan 9 libc does something similar, though it hides it behind preprocessor macros.
at the end of libc.h
1
u/a4qbfb Jan 29 '18
Just use
getopt(3)ffs.1
u/piginpoop Feb 01 '18
meh imo
most C code is like that
I guess it's orgasmic to new guys
1
u/rodrigocfd Jan 29 '18
How
Old SchoolSkilled Programmers Process Arguments