Re: Cleanup Base: fetch

看板DFBSD_submit作者時間21年前 (2005/01/06 18:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串10/12 (看更多)
Matthew Dillon wrote: > :Isn't it better to use the '\0' to make it clear it's a character? > :style(9) says this: > : > : Do not use ! for tests unless it is a boolean, e.g. use > : > : if (*p == '\0') > : > : not > : > : if (!*p) > : > :Of course it ends up being personal preference, but anyway, just curious. > > Something like '\n' at least has some readability value, but > '\0' doesn't, really. Or at least, not much. > > I guess it's personal preference, I could go either way but I > would tend to just use 0. Would 0 not be 32-bit and '\0' 8-bit? -- Mads Martin Joergensen, http://mmj.dk "Why make things difficult, when it is possible to make them cryptic and totally illogical, with just a little bit more effort?" -- A. P. J.
文章代碼(AID): #11tHEl00 (DFBSD_submit)
討論串 (同標題文章)
文章代碼(AID): #11tHEl00 (DFBSD_submit)