SRL Archive - Outdated Tutorials

Script Comments


Gu3st...

2007-09-11 10:25:12

Comments is very usefull to comment on a procedure, a constance a variable and other things, to get the user to understand what it does.

It is also usefull to take away a part of a code:

Example:
Copy/Paste this into scar.

program New;
Begin
Wait(500)
//code.
//Wait(500) //This will only wait 0.5 second instead of 1 second.
End.


This is all "Comment Codes" that you can use.

//- comments are for 1 line only.
{}- comments are for 1+ lines.
(**)- comments are for 1+lines.

Example:
Copy/Paste this into scar.

program New;
begin
//Comment.
{Comment.}
(*Comment.*)
end.

Sir R. M8gic1an

2007-09-11 14:14:25

useful :) can't say it's new info, but it's definitively useful

{ this is a bigger example,
so that you can see how
well it works, although
we're changing lines }

gerauchert

2007-09-11 14:18:04

Most ppl can figure this out from reading any tutorial…

but hell, some ppl just have no common sense and actually need this lol

maybe add some more stuff to the tut instead of it only being for comments…

nice work otherwise :rolleyes:

Fruity-Lo0py

2007-09-14 16:06:07

Yes i can now comment some stuff out, thanks!

ShowerThoughts

2007-09-14 16:11:35

1 line=// for it
1+lines={here}

Boonce

2007-09-17 02:20:54

It's amazing how many people don't use comments in their code even though they are so useful. I think I over-comment my code. :P

Gu3st...

2007-09-24 16:53:51

lol! ^^

EDIT: Did you all know about the (* Comment *) ??? :P
I figured it out by myself! :o

deoxys505

2007-10-01 21:00:06

did not know about the (*comment*) thing… is that multi lines or single? crap dude!! thats a multi liner!

wafyl

2007-11-05 17:01:28

Thanks, this really helped!