Computer Science Canada

Use. Code. Tags.

Author:  Mazer [ Mon Oct 22, 2007 1:21 pm ]
Post subject:  Use. Code. Tags.

I cannot stress how important this is. USE THEM. It makes your code SO much easier to read, and you really want to make sure it's easy to read if you expect people who actually can help you to actually bother.

It works like so:
You type this,
[code]
var name : string
get name
if name = "Jacob"
put "ok... interesting..."
end if
[/code]


and you'll get this...
code:
var name : string
get name
if name = "Jacob"
    put "ok... interesting..."
end if


See the magic? The text is monospaced, and the extra spaces for indenting aren't ignored -- that's crucial for me actually caring!

Here's how NOT to do it:
Type this...

[quote]
var name : string
get name
if name = "Jacob"
put "ok... interesting..."
end if
[/quote]


and you'll get this...
Quote:
var name : string
get name
if name = "Jacob"
put "ok... interesting..."
end if


And you can see how utterly worthless that is can't you?

If you're feeling extra special, go ahead and replace the code tags with syntax tags. Whatever.

Author:  Nick [ Mon Oct 22, 2007 2:08 pm ]
Post subject:  RE:Use. Code. Tags.

what u should do (MAZER mentioned this at the end) is use syntax tags

[syntax="programming language"]
insert code here
[/syntax]

so turing will look like:
[syntax="turing"]
var name : string
get name
if name = "Jacob"
put "ok... interesting..."
end if
[/syntax]

Turing:

var name : string
get name
if name = "Jacob"
    put "ok... interesting..."
end if


also i vote for a sticky on this thread


: