News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Closed Thread
 
Thread Tools Display Modes
Old 3rd Aug 2003, 09:39 AM   #1
Mychaeel
 
Join Date: Oct. 3rd, 2001
Location: Frankfurt/Main, Germany
Posts: 3,829
Exclamation How to post code: Use [code] tags, wrap lines, post only relevant parts

In this forum, people frequently post code snippets illustrating their problems or their solutions to other people's problems.

Directly pasting code into a posting renders it virtually unreadable though because the forum software (or actually, your web browser) swallows all leading tabs and spaces and thus removes all traces of the code's original indentation.

To prevent that from happening, enclose any code you post in [code] ... [/code] tags like this:

Code:
[code]
function MyFunction()
{
  local NicoleKidman thisActor;
  foreach AllActors(Class'NicoleKidman', thisActor)
    thisActor.GiveAcademyAward();    
}
[/code]
While the subject of how to properly indent code is a highly controversial one among coders (at least those who bother to argue about it), they all agree that some kind of indentation to give the source code visual structure is indispensable. Other people are reading your code here on a voluntary basis, so please make it as easy for them as possible.

When you post code, keep the lines short. Code lines aren't wrapped to the browser's window width, so excessively long lines will stretch the entire thread and require readers to scroll horizontally in order to read even normal text between the code. So, please manually wrap very long lines if your code contains any.

Also, only post the relevant parts of your code. Nobody likes digging through pages and pages of your code just to find the place where something "doesn't work." When you post here you should already know at which place, roughly speaking, your problem lies, so please only post as much code as is needed to understand your problem.
Mychaeel is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:12 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer