I am using the Crayon Code Highlighter. Let’s see how it works:
procedure ConfigureOptions; var Option : IOptionDefintion; begin Option := TOptionsRegistry.RegisterUnNamedOption<string>('The file to be processed', procedure(value : string) begin TSampleOptions.FileToProcess:= value; end); Option.Required := true; Option := TOptionsRegistry.RegisterOption<Boolean>('OutputInUpperCase','o', 'The output should be in upper case', procedure(value : Boolean) begin TSampleOptions.OutputInUpperCase:= value; end); Option.Required := true; Option.HasValue := False; Option := TOptionsRegistry.RegisterOption<integer>('NumberOfIterations','n','The number of times the file should be processed', procedure(value : integer) begin TSampleOptions.NumberofIterations := value; end); Option.Required := False; Option.HasValue := True; end;
Looks pretty good I think.
Nice.. I’ve been using this one:
http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/
I’ll have to check out Crayon 🙂
Hey mate,
Does this deal with greater/less than signs sensibly? I find I have to walk this careful path where I type all the text in to the visual editor (because I’m a wus and like my WYSIWYG editor), then flip to the Text Editor to enter all the code, then remember not to flip back to the visual editor lest it screw up all my generics snippets.
Cheers
Malcolm
Mal – I believe it does. It plugs right in to the WYSIWYG editor, allow you to enter code directly, so you can have your editor and eat it, too. 😉
OK, thanks mate. I’ll give it a try.
Would be easier on the eyes if the background was the same as the blog, instead of black.
Testing 1,2
Any tips on how to get pascal code highlighted on this site?
I just posted something as JavaScript, because it has // comments, single qoated strings, and the “var” and “function” keywords get highlighted. 🙂
I will note, in passing, that the Delphi support is credited to Chris McClenny, a colleague of mine. So if there are issues, I am sure he would be pleased to hear of them.