Path: utzoo!attcan!uunet!crdgw1!zephyrus!darweesh From: darweesh@zephyrus.crd.ge.com (Michael Darweesh) Newsgroups: comp.sys.mac.programmer Subject: Think C Preprocessor Question Message-ID: <13065@crdgw1.crd.ge.com> Date: 24 Oct 90 21:01:46 GMT Sender: news@crdgw1.crd.ge.com Organization: General Electric Corporate R&D Center Lines: 22 A simple question for those of you who know. Probably I should have posted to a more general C board, but here it goes. Does the C preprocessor ever do any calculations or does it only do search and replace? This question is very confusing and demands an example: #define foo 5 #define bar 8 #define baz ((foo * bar) >> 1) integer=baz; Basically, what I want to know is this... Can I make the C preprocessor (specifically Think C) actually calculate the value for baz at compile time? I would like to be able to use this syntax to define baz as 20 instead of ((foo * bar) >> 1). Thanks, -Mike Darweesh weesh@crd.ge.com md32@andrew.cmu.edu