in reply to Re: I'm creating a menu and using the input as methods. How do I use arguments?
in thread I'm creating a menu and using the input as methods. How do I use arguments?

I'm not sure what the GetInput subroutine would be. It seems like it would be the same for every method, but some methods need multiple parameters and the prompt would be different, how would I implement that?
  • Comment on Re^2: I'm creating a menu and using the input as methods. How do I use arguments?

Replies are listed 'Best First'.
Re^3: I'm creating a menu and using the input as methods. How do I use arguments?
by NetWallah (Canon) on Jun 26, 2008 at 16:45 UTC
    You have the option to use a single "GetInput" subroutine, or pass references to different subs to different methods.

    Your implementation of "GetInput" can use as many parameters as you like - you can make some, or all optional - that way you could use a single subroutine for all methods.

    In the example I showed, you certainly CAN pass different prompts back to GetInput.

    I had already given you sample code for GetInput - you can use the contents of the first Anonymous sub.

    I would suggest you try implementing the suggestion I provided, and post back specific problems you run into - we monks are happy to help you understand and troubleshoot specific issues, but are reluctant to solve the entire problem for you. This helps you become self-sufficient, while reducing our liability for misunderstanding your issues.

         Have you been high today? I see the nuns are gay! My brother yelled to me...I love you inside Ed - Benny Lava, by Buffalax

      Yeah I know I just got really confused on this one, but I'm working on it.