When to be concerned w/ passing parameters in torquescript?
by Joe Bestor · in Torque Game Builder · 03/11/2005 (7:58 am) · 1 replies
I suppose the two biggest factors would be whats being passed by copy and if the function call is inside a loop with many iterations. In the following situation I should be alright.
In the root main.cs file there are the following functions with the similar definitions:
I could write one function to replace both of these. The function push would handle both return statements based on an additional parameter.
In the root main.cs file there are the following functions with the similar definitions:
function pushFront(%list, %token, %delim)
{
if(%list !$= "")
return(%token@ %delim@ %list);
return(%token);
}
function pushBack(%list, %token, %delim)
{
if(%list !$= "")
return(%list@ %delim@ %token);
return(%token);
}I could write one function to replace both of these. The function push would handle both return statements based on an additional parameter.
Torque 3D Owner Stephen Zepp