Re: learning dragonfly or C...

看板DFBSD_kernel作者時間21年前 (2004/11/13 02:02), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串18/23 (看更多)
On Fri, Nov 12, 2004 at 01:28:46AM +0100, Jonas Sundstr?m wrote: >Matthew Dillon <dillon@apollo.backplane.com> wrote: >> :> struct fubar * blah; >> :> struct fubar *nblah; >> :> >> :> getmafubar(&nblah); >> :> blah = nblah; > ... >> Nope. Ok, I'll tell you... it's so the compiler can >> optimize 'blah' into a register. > >Cool discussion, though this a much later issue for >most coders, let alone those just starting to learn C. I'm really glad to get a dose of advanced topics. Even if they are beyond what I am ready to apply or even comprehend, exposure to the difficult stuff orients my attention in the direction of the things I still have to learn, giving an opportunity to prepare for a time that I'm ready to learn. From book 3 of Michel de Montaigne's essays, chapter 13 THERE IS no desire more naturall then that of knowledge. We attempt all meanes that may bring us unto it. When reason failes us, we employ experience. Per varios usus artem experientia fecit, [Manilius, I, 59] I'm partial to the Penguin translation: By various experiments, experience has led us to art, example showing the way. An online version is here http://www.uoregon.edu/%7Erbear/montaigne/3xiii.htm I really didn't grasp recursion when I studied Pascal, but since I got exposure back then, I was able to figure it out in an afternoon, last year, when I wrote this bash function for making ptr addresses from ip: arpa () { [ -z $1 ] && echo -n An ip address on the command line returns its\ rev=`echo $1 | cut -d\. -f1`.$2;ip=`echo $1 | cut -d\. -f2-` [ "$ip" = "$1" ] && echo ${rev}in-addr.arpa || $FUNCNAME $ip $rev ;} It is unfortunate that Matt took my question for plagiarism of his code, I can imagine how that unfolded and I'm glad he responded so I could clarify. Hopefully any misunderstanding is already put aside. I did spend a lot of time focusing that question, and I find all the responses, really valuable. They frame (and develop!) nicely the direction I had a vague notion I was headed in, controlling variable namespace in C. But first, I need some time to really soak up the answers to my last question! :-) // George -- George Georgalis, systems architect, administrator Linux BSD IXOYE http://galis.org/george/ cell:646-331-2027 mailto:george@galis.org
文章代碼(AID): #11bFgQ00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #11bFgQ00 (DFBSD_kernel)