I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX
Difference between revisions of "Comments"
From Unreal Wiki, The Unreal Engine Documentation Site
m (Reverted edits by ErortRclib (Talk); changed back to last version by Azrael) |
|||
Line 1: | Line 1: | ||
'''Comments''' are a way of inserting text into [[UnrealScript]] code to remind yourself of what the code is doing, or to give a summary of the code file. Comments will be ignored by the compiler, so they can also be used to temporarily 'disable' a line of text. | '''Comments''' are a way of inserting text into [[UnrealScript]] code to remind yourself of what the code is doing, or to give a summary of the code file. Comments will be ignored by the compiler, so they can also be used to temporarily 'disable' a line of text. | ||
− | + | [[UnrealScript]] supports two kind of comments a single comment and a multiple line comment. | |
− | + | <br> | |
− | <uscript> | + | single line comments are used like this |
− | // | + | <uscript> |
− | // | + | // The commented declaration would also make the compiler ignore the declaration therefor it can be useful to disable declarations |
− | // | + | // for various reasons such as testing and debugging. |
− | + | //var int TestVar; | |
− | + | </uscript> | |
− | + | and multiple line comments are used like this. | |
− | + | <uscript> | |
− | + | /** | |
− | + | * NOTE: Never change the value of this variable to -1! the class functions always expect it to be a positive-only value!. | |
− | var | + | */ |
+ | var int TestVar; | ||
</uscript> | </uscript> | ||
− | + | Because the [[UnrealScript]] language commenting style is very similar to other programming languages commenting styles, the following link might be useful | |
− | < | + | <br> |
− | + | [http://en.wikipedia.org/wiki/Comment_(computer_programming) Wikipedia Comment]. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | } | + | {{navbox unrealscript}} |
Revision as of 21:41, 21 April 2010
Comments are a way of inserting text into UnrealScript code to remind yourself of what the code is doing, or to give a summary of the code file. Comments will be ignored by the compiler, so they can also be used to temporarily 'disable' a line of text.
UnrealScript supports two kind of comments a single comment and a multiple line comment.
single line comments are used like this
// The commented declaration would also make the compiler ignore the declaration therefor it can be useful to disable declarations // for various reasons such as testing and debugging. //var int TestVar;
and multiple line comments are used like this.
/** * NOTE: Never change the value of this variable to -1! the class functions always expect it to be a positive-only value!. */ var int TestVar;
Because the UnrealScript language commenting style is very similar to other programming languages commenting styles, the following link might be useful
Wikipedia Comment.
Declarations | Preprocessor • Classes • Interfaces • Cpptext • Constants • Enums • Structs • Variables (Metadata) • Replication block • Operators • Delegates • Functions • States • Defaultproperties (Subobjects) |
---|---|
Types | bool • byte • float • int • name • string • Object • Class • Enums • Structs (Vector ⋅ Rotator ⋅ Quat ⋅ Color) • Static arrays • Dynamic arrays • Delegates • Typecasting |
Literals | Boolean • Float • Integer • Names • Objects (None ⋅ Self) • Vectors • Rotators • Strings |
Flow | GoTo • If • Assert • Return • Stop • Switch • While • Do...Until • For • ForEach • Break • Continue |
Specifiers | Super • Global • Static • Default • Const |
UnrealScript | Syntax • .UC • .UCI • .UPKG • Comments • #directives • Native |