Difference between revisions of "User:ANSI Soderstrom/LSL Beginners Class"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with "Hi and welcome to my LSL Beginners Class.")
 
m
Line 1: Line 1:
Hi and welcome to my LSL Beginners Class.
'''Hi and welcome to my LSL Beginners Class.'''
 
First, we need to know how the computers can understand the Humans.
Don´t forget that computers are very dumb if we don´t tell them how to work and above all : ''what is what !''
 
So, let us begin with '''How to use comments'''. Comments are very important to let know '''yourself''' what´s where exactly happened. If you read your code in a half year again, then it´s sometimes very hard to understand the idea behind '''your  own''' code. Believe me :)
 
Our LSL-Examples are ever in grey boxes (like the grey box below this line), also you can copy/paste this code directly to your LSL-Editor.
 
<lsl>
// the well-known comments are always starting with a double-slash. The LSL-Editor will display comments in a orange color.
 
/*
To comment (or comment out) multiple lines you can use a slash with a following asterisk.
If you are done with your multiple-line comments, just write a asterisk again, followed from a slash
*/
 
// you can mix this comments in this way too :
 
/* COMMENTS ARE NEVER INTERPRATED BY ANY COMPILER AND USING NO MEMORY
// so it´s a good choice to write so many comments as you can
// you write the comments for YOURSELF (except you plan to sell your code)
// If you want to sell your code, use comments !!! comment your code !!! ever !!! always !!!
*/
</lsl>

Revision as of 17:01, 22 April 2011

Hi and welcome to my LSL Beginners Class.

First, we need to know how the computers can understand the Humans. Don´t forget that computers are very dumb if we don´t tell them how to work and above all : what is what !

So, let us begin with How to use comments. Comments are very important to let know yourself what´s where exactly happened. If you read your code in a half year again, then it´s sometimes very hard to understand the idea behind your own code. Believe me :)

Our LSL-Examples are ever in grey boxes (like the grey box below this line), also you can copy/paste this code directly to your LSL-Editor.

<lsl> // the well-known comments are always starting with a double-slash. The LSL-Editor will display comments in a orange color.

/* To comment (or comment out) multiple lines you can use a slash with a following asterisk. If you are done with your multiple-line comments, just write a asterisk again, followed from a slash

  • /

// you can mix this comments in this way too :

/* COMMENTS ARE NEVER INTERPRATED BY ANY COMPILER AND USING NO MEMORY // so it´s a good choice to write so many comments as you can // you write the comments for YOURSELF (except you plan to sell your code) // If you want to sell your code, use comments !!! comment your code !!! ever !!! always !!!

  • /

</lsl>