home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.mac.programmer:20968 comp.sys.mac.oop.misc:202
- Newsgroups: comp.sys.mac.programmer,comp.sys.mac.oop.misc
- Path: sparky!uunet!cs.utexas.edu!wupost!csus.edu!netcom.com!gort
- From: gort@netcom.com (george harrington)
- Subject: Re: David Betz and Bob Language
- Message-ID: <1993Jan8.090854.13216@netcom.com>
- Organization: Netcom Online Communications Services (408-241-9760 login: guest)
- References: <01050133.mp32gx@distant.uucp> <1i886lINNg1v@tamsun.tamu.edu>
- Date: Fri, 8 Jan 1993 09:08:54 GMT
- Lines: 40
-
- In article <1i886lINNg1v@tamsun.tamu.edu> bpb9204@tamsun.tamu.edu (Brent Burton) writes:
- >edw@distant.uucp writes:
- >|
- >|It's written in K&R C, and does wierd things with function arguments. For
- >|instance, it'll define a function like this:
- >|
- >|do_expr()
- >|{ [...] }
- >|
- >|and then call it with arguments! You don't do things like this in ANSI C,
- >
- >Welcome to the weird, wild, wooly world of RealWorld Programming!
- >I'm not trying to belittle you in any way, but I've just seen *so many*
- >programs with code like this -- and they still work. Amazing.
- >
- >As you delve deeper into the worlds of other hacker's code, you'll see
- >more and more weird things (like passing 12 arguments to a function just
- >because the programmer didn't use variable argument lists - ala GNU Bison -
- >and then only using 3 in common usage. You'd think these guys never heard
- >of a parameter block or data structures before, but I digress.)
- >
- >|3. Knows what the hell is happening with the stuff I described above.
- >
- >Well, the stuff, for the most part, will work, but I can't put too much
- >confidence into code that uses anticonventions like your above example.
- >
- Actually, this is the way functions are defined in unix shells; probably
- the reasoning is to allow for a variable number of parameters. You
- would write
- for i
- do
- some code here
- done
-
- and i would loop across all the parameters.
-
-
- --
- george harrington gort@netcom.COM
- Netcom - Online Communication Services San Jose, CA
-