View Poll Results: Which code tag style do you prefer?

Voters
17. You may not vote on this poll
  • I much prefer PHP tags, they are so cool!

    3 17.65%
  • No no no, CODE tags are much more stylish!

    14 82.35%

PHP or CODE tags?

This is a discussion on PHP or CODE tags? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Simple question, which do you like more: PHP Code: #include <iostream> using  namespace  std ; int main () {       cout  <<  ...

  1. #1
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986

    PHP or CODE tags?

    Simple question, which do you like more:
    PHP Code:
    #include <iostream>

    using namespace std;

    int main()
    {
         
    cout << "Hello world!" << endl;
         return 
    0;

    Or
    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
         cout << "Hello world!" << endl;
         return 0;
    }
    Which do you find easier to read? I personally prefer PHP tags simply because of the sytax highlighting, but I want to know what everyone else likes.

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    The php tags would be great, if the colors were formatted according to C/C++ keywords and if they actually made sense.

    As it is, code tags are better.
    Away.

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    I agree with ^.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  4. #4
    Perverted unanimous's Avatar
    Join Date
    Oct 2001
    Posts
    336
    I like the ay the PHP tags look but I'm always expecting to see PHP after them for some reason. I vote stick with the CODE tags unless you write really messy code and the syntax highlighting is the only way we can read it.
    Give me a bad reputation!!!

  5. #5
    Registered User jlou's Avatar
    Join Date
    Jul 2003
    Posts
    1,088
    If you like the syntax highlighting but don't like the php coloring, try this:
    http://www.codeguru.com/samples/SyntaxHlt.html

    I think it can be configured to do what you want but out of the box it looks like this:
    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
         // With a comment.
         cout << "Hello world!" << endl;
         return 0;
    }
    I think that looks best, but I personally like no colors better than PHP colors.

  6. #6
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    I could maybe tolerate jlou's example, but the standard PHP encoding sucks big time.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  7. #7
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    Ok, so what exactly don't you like about the PHP tags, the colours used or because they don't highlight C++ keywords like int and char?

    PHP sytax colours can be configured in php.ini, so if thats why no one likes them I guess we could ask the webmaster to change them. I agree they're not the best choice of colours, but I find it very difficult to read 50-100 lines of code in plain black and white, so for me any sort of highlights are better than none.

  8. #8
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Frankly, the actual colurs are imaterial. It is simply that they do not provide additional value because they do not correctly highlight C++ syntax.

    Bit like this really.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  9. #9
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Hmmm... it would be a lot cooler if they highlighted the C++ syntax.
    Away.

  10. #10
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    i dont like the PHP tags. if you have trouble reading the black and white code, why not just cut and past it into an editor to view it?

  11. #11
    Registered User LogicError's Avatar
    Join Date
    Aug 2003
    Location
    г. Магнитогорск
    Posts
    76
    They should make C-tags and change the colors preferably like visual studio is set

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. CODE Tags script bug
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 10-15-2006, 02:18 PM
  2. code tags
    By muttski in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 04-18-2002, 06:24 PM
  3. about code tags
    By ygfperson in forum C++ Programming
    Replies: 9
    Last Post: 04-06-2002, 04:07 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21