Top "Subroutine" questions

A subroutine (e.g. procedure or subprogram) is a portion of code within a larger program, which performs a specific task and can be relatively independent of the remaining code.

Excel VBA calling sub from another sub with multiple inputs, outputs of different sizes

I would like to call a sub from another sub inside in the same module. The first sub would be …

excel vba input subroutine
excel vba call subroutine with variables

I defined the following subroutine: Sub EnterCellValueMonthNumber(cells As range, number As Integer) range(cells).Select ActiveCell.FormulaR1C1 = number …

excel vba subroutine
Syntax: "Exit Sub" or "Return" in VB.NET subroutines

Both "Exit Sub" or "Return" seem to accomplish the same thing -- exit a subroutine. Is there any difference in …

vb.net syntax return subroutine
Pass array and scalar to a Perl subroutine

Possible Duplicate: How do pass one array and one string as arguments to a function? I have a function, or …

perl reference subroutine
How to define a subroutine in PowerShell

In C# a RemoveAllFilesByExtenstion subroutine could be, for example, decleard like this: void RemoveAllFilesByExtenstion(string targetFolderPath, string ext) { ... } and used …

powershell subroutine
How do I pass a hash to subroutine?

Need help figuring out how to do this. My code: my %hash; $hash{'1'}= {'Make' => 'Toyota','Color' => …

perl hash subroutine
Correct use of modules, subroutines and functions in Fortran

I've recently learnt about interface blocks when adding a function to my Fortran program. Everything works nice and neatly, but …

function module fortran fortran90 subroutine
How to pass optional parameters to a Perl function?

I want to pass several parameters, one of which is optional, to a function. The only way to do it …

perl subroutine
When should I use the & to call a Perl subroutine?

I have heard that people shouldn't be using & to call Perl subs, i.e: function($a,$b,...); # opposed to &…

perl subroutine
Assembly 'call' vs 'jmp'

I got told to try and use 'jmp rather than 'call', but 'jmp' is not liking me .. when I jump …

assembly x86 subroutine