<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>The modern graphical world is a new complexity, but I past years I looked
after a code base (not Pascal/Delphi) across 3 operating systems (PDP,
Dos/Windows, and Unix) where the code was about 99.5-100% common in a code base
of 1 million+ lines.</DIV>
<DIV> </DIV>
<DIV>There we isolated anything that differed <STRONG>in any way</STRONG> across
platforms to libraries, and made a wrapper for each with a new invented common
name, and inside the wrapper was IFDEF code for each compiler/operating
system. The libraries were as much as possible a single code base as well
(with ifdefs). That was the crucial design step.</DIV>
<DIV> </DIV>
<DIV>Looking back I can see some of the library routines eg screen output had
ifdefs for TSXPL, DBL, SFW, Sibol, SFB, Unix, Debug which covered 5
compilers on 3 operating systems, 4 different compiler vendors (each with
different memory models), and different versions of each compiler. Each
compiler had quite different syntax extensions to deal with many of the
API’s - ( None of these syntax extensions were allowed to be used outside
of the libraries). The entire source code base had to be moved to each operating
system and compiled there against the appropriate compiler and IFDEF’d library
code. However it was very successful for the life of all those
operating systems, and is still alive on Windows.</DIV>
<DIV> </DIV>
<DIV>Inside each IFDEF in the library, the code was native, calling the
appropriate native APIs. The approach can be described as “Put all the
grief and problem stuff in just one place” </DIV>
<DIV> </DIV>
<DIV>How much simpler life and bug fixing gets with a single code base cannot be
overstated!</DIV>
<DIV> </DIV>
<DIV>For instance something that misbehaved everywhere meant look in the common
code, something that misbehaved only on one platform meant look at the library
wrapper routine.</DIV>
<DIV> </DIV>
<DIV>When getting to Android etc projects I am sure as much as feasible I will
be taking a similar approach. So it can be done (in theory). In
practice I have yet to see!</DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=leigh.wanstead@gmail.com
href="mailto:leigh.wanstead@gmail.com">Leigh Wanstead</A> </DIV>
<DIV style="font-color: black"><STRONG></STRONG> </DIV></DIV></DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV dir=ltr>Hi Jolyon,
<DIV> </DIV>
<DIV>Don't you think that 75% common code is a great success?<IMG
style="VERTICAL-ALIGN: middle; MARGIN: 0px 0.2ex"
src="cid:D664AA32121B4EC58C08F8DCA08188AF@JohnHP1" goomoji="330"></DIV>
<DIV> </DIV>
<DIV>Regards</DIV>
<DIV>Leigh</DIV></DIV></DIV></DIV></DIV></BODY></HTML>