SRL Archive - General

Need A List Of KeyWords


SKy Scripter

2007-02-26 14:59:53

Can somone get me a list of all the key words
and what they do please!!!

Example:
Try, Begin, end ,repeat, shr, shl, case, of

those are all key words but i want all of them ;)

:cartman:

Mr. Doctor

2007-02-26 19:08:37

umm theres alot…

begin
end
end;
end.
repeat
procedure
until
case
of
and
shl
shr
do
to
try
downto
for
program
in
string


thats all i know :p

SKy Scripter

2007-02-27 16:48:28

dang i know all those and more :mad:
all well………………

Freddy1990

2007-02-27 17:34:37

There are more, but these are the most important (and most of the others, if not all, don't work properly or not at all):
and
array
begin
case
const
div
do
downto
else
end
except
exit
finally
for
forward
function
goto
if
label
mod
nil
not
of
or
procedure
program
record
repeat
shl
shr
then
to
try
type
until
var
while
with
xor


And btw, string isn't a keyword, it's a type

botmaster

2007-02-27 17:37:07

Here's some:

and array begin case const div do downto else end file for forward function goto if in label mod nil not of or packed procedure program record repeat set then to type until var while with

EDIT: Damn freddy, you posted before I had time to finish writing mine, while I was still writing :D. Oh well, too late, can't delete this useless one now XD.

Freddy1990

2007-02-27 17:43:29

From: botmaster
Here's some:

and array begin case const div do downto else end file for forward function goto if in label mod nil not of or packed procedure program record repeat set then to type until var while with

EDIT: Damn freddy, you posted before I had time to finish writing mine, while I was still writing :D. Oh well, too late, can't delete this useless one now XD.


file isn't a keyword of scar and set is useless, doesn't work properly

bullzeye95

2007-02-27 17:45:17

Wrong time to ask this, but what does Forward do? I could never figure that out ;)

Smartzkid

2007-02-27 17:57:14

Just wondering…but why is there a Cardinal type in scar?

Yakman

2007-02-27 18:40:49

forward changes the order of the compilation
this gives an error

procedure Hello;
begin
writeln(GetMessage);
end;

function GetMessage:string;
begin
result:= 'Hello';
end

but this doesnt

function GetMessage:string; forward;
procedure Hello;
begin
writeln(GetMessage);
end;

function GetMessage:string;
begin
result:= 'Hello';
end

it can be used if you want to make your code more organised, or if your making an include like SRL and you want to keep everything in order

Boreas

2007-02-27 19:31:05

Can also be used to call a procedure that is in a script, from inside an include.


boreasanimation is the script, boreasanimationtest is the include.

Gah I ran out of upload space.

SKy Scripter

2007-02-28 14:34:39

goto // i don't understand this
label // i don't understand this
nil // i don't understand this

And btw, string isn't a keyword, it's a type


look at this link…………..


ok i thought they were keywords

Freddy1990

2007-02-28 16:09:07

http://www.villavu.com/forum/showthread.php?t=3890?t=4659

nil is for example the state of an object before you create it…
for example:

var
Button: TButton;

until you do like Button := TButton.Create(Form); ur Button will hold the value nil…

Also, you can for example create object not lined to another one, but i don't recommend that for most cases… unless for example, u use ur object without a form… But most object that need a sender to create in scar (now) need a form anyway or you can't use them…

For example:
Button := TButton.Create(nil);

Not that you can't create them wil a nil as sender… (which tells the object it doesn't have a sender in particular), if you put a form as parent it still works and everything… but oh well, you gotta make that out for urself :)

SKy Scripter

2007-02-28 17:16:31

wow, thanks man it's nice to learn new stuff!!!

o yeah do you know how to place functions and procedures in
Types
like TButton, TMemo, TImage and ect………

Freddy1990

2007-02-28 17:28:53

like other stuff i guess..
type
ButtonForm = record
Form: TForm;
Button1, Button2: TButton;
end;

Ejjman

2007-02-28 18:33:22

Whats the diff between types and vars..? :duh:

Boreas

2007-02-28 19:59:38

types are kinds of vars

bullzeye95

2007-02-28 20:03:10

Like a boolean, an integer, a string, they're all variables. Just different TYPES of variables

Freddy1990

2007-03-01 16:15:07

Integer, string, Extended, Boolean, etc…
They're all types…
However, if you for example do:
var
a: Integer;

Then a would be a variable of the type Integer…
The type is the structure of the variable, in other words, what can be in it and how it can be divided.

n3ss3s

2007-08-03 10:18:48

Yeah, like TPoint is

program new;
type
TheTPoint = Record // Had do use "TheTPoint" because TPoint wud give duplicate identifier…
X: Integer;
Y: Integer;
var
A: TheTPoint;


Boreas

2007-08-03 13:14:58

03-01-2007, 04:15 Pm

n3ss3s

2007-08-03 14:12:11

03-01-2007, 04:15 Pm

WTF?

Boreas

2007-08-03 14:44:37

You gravedug

n3ss3s

2007-08-03 15:17:26

:( how and where? sry…