Jump to content

returning a value in a func


Recommended Posts

I'm lost. Can you tell me how to return values from functions and use them in other parts of my code because I cannot understand the helpfile.

I feel like I'm screwed because I'm trying to count the number of lines in a file for specific types of windows that are open. thats why i tried creating this function because I can't manually specify the file to count the lines from, it has do do it for each of those types of windows

>_< :(:(

Edited by Hypertrophy
Link to comment
Share on other sites

Return interrupts function and gives "outside" any value that it is executed with. You cannot execute multiply returns because the very first jumps out of function into place where it was called from. If you want to return few values you can store it in array and return that array.

I am not sure what you are trying to do in example because you aren't using $value that you are passing to the function for anything.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...