SRL Archive - OSR Help

Some Words I Would To Be Explained


Ducksarecool

2012-05-05 18:05:47

hey guys, im harry. For months ive been saying to my self im going to learn to script in Simba tomorrow but today i acctualy got started and i came across so words that seem to be vital and i know what most of them mean in normal context just not in computer science. I am only 14 so my vocabulary is not so good, i dont want any fags coming here and commenting saying :google: and stuff because i have and i do get them a bit but i would just love it if someone could post what each word means and when it is used maybe even an example? if you cant be bothered then fair enough just maybe do one word and i'll be happy, thanks.

here's the words:

Parameter (Limit?)
String
Integer
Extended
Boolean (is this just simply True/False?)
Procedure and Function (im not sure on the difference)
Constants
Variables (in chemistry and stuff this is something that can be changed?)
Global/Local Variables (^)
Parenthesis
Constants (something that repeats??)
String

Ducksarecool

2012-05-05 18:11:38

*Some Words I Would Like To Be Explained

Neznam

2012-05-05 18:18:19

http://villavu.com/forum/showthread.php?t=58935

Here is a beginners guide by Coh3n.
It explains a lot of what you are asking about.

I too am learning :]

EDIT:
http://villavu.com/forum/forumdisplay.php?f=95

Also ^ this section has more beginner guides that are very useful.

I found this named "script down your first rs tree" here…
http://villavu.com/forum/showthread.php?t=44942
particullarily useful and informative.

bluez

2012-05-05 18:20:40

in most computer programming languages, a boolean may refer to or represents either true or false.

took you 5mins to write that request!

took me 1 sec to google it!!!!!!!!!!

kevin33

2012-05-05 18:20:41

Parameter (Limit?)-Yes
String-A word or combination of characters or letter (i.e. COAL)
Integer- A number
Extended-(Not to sure about this one)
Boolean (is this just simply True/False?)-Yes it is it returns as true or false(Yes/no type deal used in functions and to declare variables)
Procedure and Function (im not sure on the difference)-Function returns something (string, boolean, integer), procedure does exactly what it is told
Constants- Stays the same throughout the entire process (i.e ColourOfOre = # it will be # no matter what)
Variables (in chemistry and stuff this is something that can be changed?)-Yes variables are things that change throughout the script so you must declare them to be an integer, boolean, string, etc.
Global/Local Variables (^)-same thing I guess
Parenthesis-Parenthesis are these guys right here ( )
Constants (something that repeats??)-See above
String- See above

Sin

2012-05-05 18:23:22

An Extended is just a decimal number.

Rich

2012-05-05 18:28:55

Parameters are what you enter in procedures and functions. For example, in the procedure Wait, the amount of time you enter is the parameter:
program new;

begin
Wait(1000); // 1000 IS THE PARAMETER HERE
end.

Strings are variables which are bits of text:
program new;
var
S : string;

begin
S:= 'Hey :D';
end.


Integers are also variables but are whole numbers:
program new;
var
I : Integer;

begin
I:= 1;
end.

An Extended is similar to an Integer, but can cope with decimal points. And it's a variable:
program new;
var
E : Extended;

begin
E:= 2.3562
end.

Booleans are, like you said, True or False. Again, a variable:
program new;
var
B : Boolean;

begin
B:= True;
end.

Check out my guide on Procedures and Functions.

Constants are what are we set before the script even starts:
program new;
const
WaitTime = 1000;
begin
Wait(WaitTime);
end.

Variables, like in chemistry, can be changed throughout the script:
program new;
var
WaitTime : Integer;
begin
WaitTime:= 1000;
Wait(WaitTime);
WaitTime:= 2000;
Wait(WaitTime);
end.
You've probably guessed by now that all are declared like that, with the desired name, followed by a colon and then the type.

A global variable is one which is declared outside of an procedures or functions, like the one above. A local variable is the opposite:
program new;
var
WaitTime : Integer;
begin
WaitTime:= 1000;
Wait(WaitTime);
WaitTime:= 2000;
Wait(WaitTime);
end.
Trying to use a local variable outside of that procedure will give an error, but you can use the same name in other procedures.

Parenthesis are brackets.

:)

Paradoxium

2012-05-06 08:11:27

Rich just crushed this :D haha