[Oberon] Conditional compilation using IF const THEN

Chris Burrows cfbsoftware at gmail.com
Wed Feb 5 03:57:09 CET 2025


There was a discussion on this mailing list with this title back in 2018.
Recently an Astrobe user requested this feature so we revisited the
discussion. We are now in the process of final testing of an Astrobe
implementation based on Jörg Straube's suggestion:

https://lists.inf.ethz.ch/pipermail/oberon/2018/012137.html

Elimination of unused code in this way is very useful when developing
software for embedded systems. The development boards we support have as
little as 64 KBytes available for code. Diagnostic code can be included
when doing unit testing on separate modules but needs to be eliminated to
enable all the modules to be linked together in an executable without
exceeding the code space available.

Having to edit source code e.g. to change the value of a test CONST from
TRUE to FALSE in multiple modules can be tedious and error prone. A useful
technique which allows the Astrobe programmer to switch between the test
modules and the production application *without* editing any source code
module is described in the *Conditional Compilation* topic of the Astobe
Forum:

https://www.astrobe.com/forum/viewforum.php?f=4
--
Regards,
Chris Burrows
CFB Software
https://www.astrobe.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20250205/6581fa51/attachment.html>


More information about the Oberon mailing list