SL Cert - Scripting Test Reviews
Scripting Test Review Page
SL Cert Basic Scripting Example Test
- ) A script is written in what computer language?
a) html
b) c++
c) lsl
d) xml
- ) Which of the following could a script be used for?
a) uploading textures
b) uploading audio/media
c) increasing simulator performance
d) none of the above
- ) What is Mono?
a) a form of audio using only one channel
b) a french soft cheese
c) an open source scripting engine
d) a database
- ) What does lsl stand for?
a) Lucifers Standard Lemon
b) Linden Scripting Logo
c) Language Scripting Loop
d) Linden Scripting Language
- ) What memory would a pre mono script have available?
a) 64k
b) 32k
c) 16k
d) 8k
- ) When a script is compiled, how does it treat code comments?
a) causes compile error
b) converts them
c) ignores them
d) highlights them
- ) Consider the following code:-
<lsl>
integer v; default
{
on_rez(integer p){ state run; }
state_entry(){ v=10; state run; }
state_exit(){ v=100; }
}
state run
{
on_rez(integer p){ llResetScript(); }
state_entry(){ llSay(0,"V="+(string)v); }
}
</lsl>
a) If the above script is placed in an object and that object is rezzed inworld, what would it say as the value of V?
a) 100
b) 20
c) 10
d) 0
b) If the above script was reset whilst rezzed in world, what would it say as the value of V?
a) 100
b) 20
c) 10
d) 0
- ) Consider the following code:-
<lsl> integer v;
default
{
on_rez(integer p){ state run; }
state_entry(){ v=10; state run; }
}
state run
{
on_rez(integer p){ llResetScript(); }
state_entry(){ llSay(0,"V="+(string)v); }
state_exit(){ v=100; }
}
</lsl>
a) If the above script is placed in an object and that object is rezzed inworld, what would it say as the value of V?
a) 100
b) either 0 or 10
c) either 10 or 20
d) 0
b) If the above script was reset whilst rezzed in world, what would it say as the value of V?
a) 100
b) 20
c) 10
d) 0
c) What would the object say if it were rezzed and then reset?
a) 100
b) 20
c) 10
d) 0
- ) Consider the following code:-
<lsl>
integer i=1; float f=1.0; string s="1";
default
{
on_rez(integer p){ llResetScript(); }
state_entry() { integer v=i+(integer)f+(integer)s; v=v+1; v+=1; v++; ++v; llSay(0,"V="+(string)s); }
}
</lsl>
a) When the above script runs what will it say as the value of V?
a) 3
b) 7
c) 12
d) 1
b) If the line <lsl>llSay(0,"V="+(string)s);</lsl> is changed to <lsl>llSay(0,"V="+(string)v);</lsl> what would it say as the value of V?
a) 3
b) 7
c) 12
d) 1
c) Keeping the code as per change in #b and altering the line <lsl>v=v+1;</lsl> to <lsl>v*=3;</lsl> what would it say as the value of V?
a) 3
b) 7
c) 12
d) 1
- ) Which of the following is a function?
a) (vector)v
b) llSay()
c) !=
d) state_entry()
- ) Which of the following is an operator?
a) (vector)v
b) llSay()
c) !=
d) state_entry()
- ) Which of the following is a typecast?
a) (vector)v
b) llSay()
c) !=
d) state_entry()
- ) Which of the following is an event?
a) (vector)v
b) llSay()
c) !=
d) state_entry()
- ) Which of the following is a function?
a) setup()
b) timer()
c) on_rez()
d) state_entry()
- ) Consider the following code:-
<lsl>
integer v;
default
{
on_rez(integer p){ llResetScript(); }
touch_start(integer n) { v+=n; if(v==10 || v==20){llSay(0,"HELLO!");} }
}
</lsl>
a) Whats the minimum number of times object containing this script needs to be touched in order to make it say "HELLO!"?
a) 1
b) 2
c) 5
d) 10
b) Changing above code <lsl>(v==10 || v==20)</lsl> to <lsl>(v==10 || v!=20)</lsl> Whats the minimum number of times object needs to be touched in order to say "HELLO!"?
a) 1
b) 2
c) 5
d) 10
c) Changing above code to <lsl>(v==10 || v<20)</lsl> Whats the minimum number of times object needs to be touched in order to say "HELLO!"?
a) 1
b) 2
c) 5
d) 10
d) Changing above code to <lsl>(v>4 && (v+1)>5)</lsl> Whats the minimum number of times object needs to be touched in order to say "HELLO!"?
a) 1
b) 2
c) 5
d) 10