PDA

View Full Version : variables as parameteres of a function?


hrpremier
08-14-2003, 09:30 PM
yes i am a newbie :)

but can a pass a variable as a parameter of a function?

if so what would the syntax be and would setting the variable be any different?

boyzdynasty
08-15-2003, 08:16 AM
Originally posted by hrpremier
yes i am a newbie :)

but can a pass a variable as a parameter of a function?

if so what would the syntax be and would setting the variable be any different? Not really sure what you mean...but here is an example


function test123 (temp){
trace (temp);
};

test123("Hello world");

hrpremier
08-15-2003, 08:20 PM
in your example, could i get a button to set the value of temp?

boyzdynasty
08-15-2003, 10:05 PM
yea...
if I have that function....
and I have a button...I can tell the button to do this
on (press) {
test123("The button was press");
}