Results 1 to 13 of 13

Thread: Delphi Syntax Highlighting?

  1. #1

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Delphi Syntax Highlighting?

    Would it be possible to iclude a highlighter for Delphi, like you can add this for VB, and there is one for code, it would be great to include one for Delphi, the amount of code and examples i post, it would make it clearier to see

  2. #2
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Delphi Syntax Highlighting?

    Quote Originally Posted by Madboy
    Would it be possible to iclude a highlighter for Delphi, like you can add this for VB, and there is one for code, it would be great to include one for Delphi, the amount of code and examples i post, it would make it clearier to see

    It would be nice, it would make the code more neater

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Delphi Syntax Highlighting?

    The Code tags are built-in to the forum software, and the VBCode tags are a special modification for this site. To allow highlighting for Delphi (or any other language) would require a similar modification.

    As you may already be aware, we are not keen to make any alterations to the forum software (basically it wont happen unless there is a very strong case for it), as any extensions can have unexpected impacts elsewhere.

    As Delphi is only used by a small minority of users here, this wont be happening I'm afraid


    What I would recommend is using the Code tags, and (if you feel bored!) create your own desktop formatter, so that it puts in any appropriate colouring tags, ready for posting on this site.

    If you did this, you could put it in the UtilityBank for our other Delphi users to use when they post.

  4. #4

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Re: Delphi Syntax Highlighting?

    Quote Originally Posted by si_the_geek
    What I would recommend is using the Code tags, and (if you feel bored!) create your own desktop formatter, so that it puts in any appropriate colouring tags, ready for posting on this site.

    If you did this, you could put it in the UtilityBank for our other Delphi users to use when they post.
    Thats a great idea si, might get started on it, who knows, maybe i could do one for Delphi, HTML & VB etc

  5. #5
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Delphi Syntax Highlighting?

    Quote Originally Posted by Madboy
    Thats a great idea si, might get started on it, who knows, maybe i could do one for Delphi, HTML & VB etc

    That would be good and useful to a lot of people if you were to distribute it

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Delphi Syntax Highlighting?

    Quote Originally Posted by Madboy
    Thats a great idea si, might get started on it, who knows, maybe i could do one for Delphi, HTML & VB etc
    There is already a code formatter for VB in the CodeBank. It is pretty cool. It was developed and submitted by Arachnid13.

  7. #7

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Re: Delphi Syntax Highlighting?

    Quote Originally Posted by Hack
    There is already a code formatter for VB in the CodeBank. It is pretty cool. It was developed and submitted by Arachnid13.
    Im sure that is good, but if i were to make a multi-format highlighter, that would be more useful, to tailor for C#, C++, Delphi, HTML & VB etc

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Delphi Syntax Highlighting?

    Quote Originally Posted by Madboy
    Im sure that is good, but if i were to make a multi-format highlighter, that would be more useful, to tailor for C#, C++, Delphi, HTML & VB etc
    Now if you built formatter with a function to select the language you wanted to format the code for, that would be well beyond way cool!!

  9. #9

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Re: Delphi Syntax Highlighting?

    Quote Originally Posted by Hack
    Now if you built formatter with a function to select the language you wanted to format the code for, that would be well beyond way cool!!
    That was my intentions, if misunderstood in my second post i think, i will get onto it asap, let the power of delphi behold.......

  10. #10
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Delphi Syntax Highlighting?

    Excellent, I look forward to seeing it

  11. #11
    ex-Administrator brad jones's Avatar
    Join Date
    Nov 2002
    Location
    Indianapolis
    Posts
    6,614

    Re: Delphi Syntax Highlighting?

    There are also several code color'ers on CodeGuru with the code They can be used to format into HTML and vBulletin tags. They would also make a good starting point for doing Delphi coloring.

    Brad!
    Have you given out your reputation points today? Select the Rate This Post link to give points for good posts!
    -------------------------------------------------------------
    Brad! Jones
    Lots of Software, LLC
    (I wrote: C Programming in One Hour a Day) (Dad Jokes Book) (Follow me on Twitter)

    --------------------------------------------------------------

  12. #12

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Re: Delphi Syntax Highlighting?

    Quote Originally Posted by brad jones
    There are also several code color'ers on CodeGuru with the code They can be used to format into HTML and vBulletin tags. They would also make a good starting point for doing Delphi coloring.

    Brad!
    Thanks, i might take a look. I have just been experementing, i already know how to parse URL's in a Rich Edit box, just need to work on colouring variable names etc

  13. #13

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Re: Delphi Syntax Highlighting?

    I looked on that site but found nothing

    However, since then i have been working hard to work on this new syntax highlighter. So you could call this an update.

    So far i have created:

    > A tabbed interface, which comprises of Delphi, HTML and VB tab layout
    > Parsing HTML is complete, all tags are formatted appropriately

    Problems:

    It is going to be a really hard job for me to work out the colouring for Delphi and VB, highlighting correct variables, function, procedure names etc, especially in Delphi as it is harder

    I will need to replace the tags to the correct format for this forum, as standard tags might not be recnognised.

    What i aim to do now, is basically use the HTML colouring code i have now(it would be hard and time lengthy to re-write a Delphi and VB function), and use it as a new function. I will then need to replace the variables etc into tags, using Replace methods. So for example:

    If you typed: Dim, or //Comment - processing this would replace it into:

    <blue>Dim<blue>

    <green>//Comment<green>

    This could get confusing, i would appreciate some pointers, as i could easily mix up the forums coding, and HTML style.

    Hope this update makes more sense to you, then it did for me writing it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width