LOGIN
SEARCH
STATS
PROFILE
MEMBERS
GROUPS
keys: ↑ ↓
LOGOUT
INDEX
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
PLAY with VIDEOS
101's
keys: ← →
Guest Access
Register:
Members:



View previous topic View next topic Go down Message [Page 1 of 1]

Administrator
Administrator
#1 RGSS = Scripting Basics - Comments
Loading

G@MeF@Ce

Administrator
Administrator
Administrator
profile
"Comments" are lines or blocks in the script that are bypassed
and are not processed as part of the programming.

Good use of comments reflects great programming. Starting with the script title, version information, credits, instructions, to lines that separate class and methods down to the key notes.

In this lesson you will learn the two ways to make comments:

1.) line comments

To make a line comment in Ruby, simply use the pound sign

Code:
#

(a.k.a. the octothorpe, the hash, the number sign, or the square)

All syntax from the "#" to the end of the line is ignored when the program runs.


for example:

Code:
# everything after the number sign on this line will be bypassed


2.) block comments

to comment multiple lines or to create a comment block start with

Code:
= begin

place your commentary, then end the block with

Code:
= end

for example:

Code:
=begin
everything in between will become a commentary
=end

The color Green will indicate code that is being commented.

that's it! easy right? ^,^
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr http://www.youtube.com/user/MrGameface101?feature=watch

View previous topic View next topic Back to top Message [Page 1 of 1]

 

Chatbox system disabled
Personal messaging disabled