[Home] [Puzzles & Projects] [Delphi Techniques] [Math topics] [Library] [Utilities]
|
|
I recently discovered that a number of the Delphi programs on my home computer had the "Range checking" compiler option enabled. Range checking is a useful debugging tool when mysterious errors occur during testing. The cause is frequently that some array that has exceeded it's bounds and overwritten some other part of the program's data or code. Range check immediately stops and warns when this occurs. So it's handy and effective, but also has a large performance impact since every data change is tested before being applied. My general intent is "range checking on" during testing but "range checking off" in the final product. Now if only I can remember to turn it off! That situation was the motivation for this program. Each Delphi project had an associated configuration text file with a .cfg extension which, among other things, sets every compiler option including range checking. The range check line is -$R+ for checking on and -$R- for checking off. Running this program against .cfg files changing $R+ to %R- scanned 1800 projects here and found 240 with "Range Checking" turned on! I have not analyzed results yet, but I know that many of these are still in my "Future Projects" folder and others are leftover test versions which may have had the option turned off in the final posted version. Applying the changes where appropriate will be my next project. In the meantime, I made the Bulk Find Replace program generalized with these options and features
July 17, 2015: I just discovered that the original program version did not correctly search or replace text in files formatted with wide (Unicode) strings. Version 2 posted today will correctly find and replace characters or strings for files with ANSI or Unicode strings. Let me know if you find it useful (or especially if you find bugs!) .
|
[Feedback] [Newsletters (subscribe/view)] [About me]Copyright © 2000-2018, Gary Darby All rights reserved. |