Forms Delphi

Title: Formated source code within articles
Question: How to put well formated source code fragments into Delphi 3000 articles.
Answer:
Here is an examples how well formated delphi code could look:
function DeleteADOTable(cn: TADOConnection; const TableName:string):Integer;
const
DELETE_STATEMENT = 'DELETE FROM ';
begin
if IsSQLServerConnection(cn) then
begin
try
cn.Execute('TRUNCATE TABLE ' + TableName, Result);
except
// use (slower) delete if truncate fails
cn.Execute(DELETE_STATEMENT + TableName, result);
end;
end
else
cn.Execute(DELETE_STATEMENT + TableName, result);
end;
If you want to format your articles like the example above, download the
freeware GExperts. (http://www.gexperts.org)
Mark your source code in the IDE, select GExperts - Source Exports... from the menu.
Then copy the marked code fragment as HTML into the clipboard and paste it
in your browser window.