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.

Why am I getting "called too early to check prototype" warnings in my Perl code?

I have a Perl file like this: use strict; f1(); sub f3() { f2(); } sub f1() {} sub f2() {} In short, f1 …

perl subroutine
Using CALL for labels in a batch script

When using the CALL command to call a label in a batch script, and you end the sub-routine with GOTO:…

batch-file cmd call subroutine
What's the primary difference between branch instruction and branch with link instruction? ARM?

From what I read, the branch with link is used to perform subroutine call and the registered link is copied …

assembly arm subroutine function-call
Undefined subroutines &main error in Perl

I am trying to extract a DNA sequence from this FASTA file to a specified length of bases per line, …

perl bioinformatics subroutine fasta
How to alias a function name in Fortran

Not sure if the title is well put. Suggestions welcome. Here's what I want to do. Check a condition, and …

function pointers fortran alias subroutine
Default argument values in subroutines

I don't know how to set default arguments for subroutines. Here is what I considered: sub hello { print @_ || "Hello world"; } …

perl function subroutine
Redim Preserve gives 'subscript out of range'

I want to Redim Preserve an array I keep getting the error 'subscript out of range'. I am aware of …

arrays vba excel subroutine preserve
How to handle subroutine redefined errors in Perl

So I have a file that in short has this problem... #!/usr/bin/perl -w package Foo; use strict; use …

perl warnings subroutine
Why would I use Perl anonymous subroutines instead of a named one?

I'm just curious why one would choose to use an anonymous subroutine, versus a named one, in Perl. Thanks.

perl anonymous subroutine
Perl modifying hash reference in subroutine

I am having trouble understanding the hash references and changing the hash in place, instead of returning it. I want …

perl hash subroutine