DPRG
DPRG List  



DPRG: Poke

Subject: DPRG: Poke
From: Dan Miner miner at centtech.com
Date: Mon Aug 16 19:10:31 CDT 1999

> From: MIKE MCCARTY -- 93789 [mailto:JMCCARTY at DEVEL.USA.ALCATEL.COM]
> Sent: Monday, August 16, 1999 6:31 PM
> 
> I have a question which I was reminded about on looking at 
> the code for the Ming pair.
> 
> Why do so many robotics C programmers insist on using peek() and
> poke()? Those look like ugly hangovers from the bad old BASIC days.
> Neither is necessary nor desireable in a C environment.

[...snip...]

> So tell me, why do roboticists program like this?

My guess is that many roboticists are not programmers and follow
whatever snippet of code they can find on the web or in a book.

Now, a good question is why would a book contain code like this???
Or better, why would a compiler writer include such functions or
macros?  Probably because their customers requested it.  :-)

[ peek() and poke() could be macros and thus would generate the
same code as you propose.  Your *IS* more readable though.]

				- Dan

------------------------------

More information about the DPRG mailing list