benners Posted March 14, 2017 Posted March 14, 2017 If a function returns a simple result such as a string or number, I normally just call the function without assigning the returned value to a variable, e.g FileWriteLine($h_LogFile, FileGetVersion($s_File, $FV_FILEDESCRIPTION) & @CRLF) If I am going to use the returned result multiple times within the same function, I normally create a variable and store the value in it. $s_Description = FileGetVersion($s_File, $FV_FILEDESCRIPTION) FileWriteLine($h_LogFile, $s_Description & @CRLF) ; use $s_Description a few more times later... I was just curious what others did. From a speed point I guess there isn't much difference, but it does save creating a Local variable.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now