Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

About this forum

How to include syntax highlighting in code examples. by Griffyn
Posted: 14 Dec 06 (Edited 2 Jan 07)

We all appreciate our programming editor's (IDE) syntax highlighting, and so I provide a couple of tools to quickly give your forum posts that professional edge tongue

eg. for Delphi


procedure TMyClass.Whatever(var Param: Integer);
  s : String;
  x : Real;
  inherited;   // call TBaseClass.Whatever
  if s = 'text' then
    x := 0.50;

The programs can be easily set up for any number of languages, just pop your preferred colours, formatting, and the special characters that mark comments, strings, etc. into the config.ini within.

Currently the configuration has been set up for Delphi and VB.

Download from http://users.tpg.com.au/adslwja4/BBCoder.zip

The package consists of two tools, a standalone program that you can copy plain code into and bbcode formatted code out of, as well as a Browser Helper Object that once installed will automatically provide syntax highlighting on any code samples you post.  See the readme.txt file in the archive above for instructions on installing and using.

Back to Embarcadero: Delphi FAQ Index
Back to Embarcadero: Delphi Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close