[fpc-pascal]General Question on code optimization...

Rainer Hantsch rainer at hantsch.co.at
Tue Oct 7 16:05:22 CEST 2003


I wrote a unit for using MySQL a long time ago. It is basically the mysql
unit, but with some modified/added functions to make life easier. But it is
still procedural (currently not OOP).

Now I added some functions which allow me to access SQL data fields by
their name and some other minor things.

Since this moment, I cannot compile old programs with this modified unit any
more on an old SuSE 5.2 system with FPC 1.0.4, while they compile fine with
the same compiler version on newer Linux versions! (-> Because newer FPC
versions do not work on SuSE 5.2/5.3, I cannot upgrade to them.)

I tried to find out the reason, the problem is caused by some string
definitions which seem to be used only by this new procedures when accessing
fields by their name. (If somebody wants to have a look on the source, I can
mail it to him, but I do not want to place here a long source by default.)

I could understand that the problems arise when I make use of this (new)
functions, but shouldn't the compiler recognize when I do not use them
and completely leave them out? In this case, compilation should still work,
isn't that right?

If somebody can help, please do so. -- Thanks.


  Ing. Rainer Hantsch

|      \\|//              Ing. Rainer HANTSCH  -  Hardware + Software |
|      (o o)        Service - Support - WEB-Design und Programmierung |
| Ing. Rainer HANTSCH |  mail: office at hantsch.co.at                   |
| Khunngasse 21/20    |   www: http://www.hantsch.co.at               |
| A-1030 Vienna       |   tel: +43-1-79885380    fax: +43-1-798853818 |
| ** A u s t r i a ** | handy: +43-664-9194382   UID-Nr: ATU 11134002 |

More information about the fpc-pascal mailing list