PDA

View Full Version : PHP or CODE tags?



nickname_changed
08-09-2003, 07:29 PM
Simple question, which do you like more:


#include <iostream>

using namespace std;

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

Or


#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.

confuted
08-09-2003, 07:39 PM
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.

XSquared
08-09-2003, 10:27 PM
I agree with ^.

unanimous
08-09-2003, 11:25 PM
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.

jlou
08-10-2003, 01:13 AM
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:
#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.

adrianxw
08-10-2003, 01:35 AM
I could maybe tolerate jlou's example, but the standard PHP encoding sucks big time.

nickname_changed
08-10-2003, 02:59 AM
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.

adrianxw
08-10-2003, 03:29 AM
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.

confuted
08-10-2003, 12:27 PM
Hmmm... it would be a lot cooler if they highlighted the C++ syntax.

Perspective
08-10-2003, 12:29 PM
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?

LogicError
08-11-2003, 07:57 AM
They should make C-tags and change the colors preferably like visual studio is set :)