Questions tagged [subroutine]
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. The syntax of many programming languages includes support for creating self contained subroutines, and for calling and returning from them. They are in many ways similar to functions, but usually have side-effects outside of the simple "return value" that functions return.
1
vote
1
answer
109
views
I have written a code for data management and parallel arrays but it has to be broken into methods/subroutines. Whenever I try to do so, some aspect of my code stops working. Would it be possible for ...
Another code clean up I am working on. I have been breaking up my code based on things I have learned here on CR. The code below all works and functions as expected, but I know it can be streamlined ...
I currently have an Excel workbook which pulls data from a website that lists sign language interpreters from here.
There are 7 different regions, or tables, I pull from. The data is put into Sheet1, ...
I have written a script, that reformats the output of qstat -f1 of the PBS queueing system. Unfortunately this project is by far too big to post here complete, also ...
2
votes
1
answer
55
views
I would like to use the following routine in my submission script for GAMESS calculations. I am not entirely sure if this is the optimum way to go.
This function would need one of the messaging ...
I would like to use the following routines in my submission script for GAMESS calculations. Before I do, I would like to get some input if I can improve it somehow.
The three messaging routines (<...
While fiddling around, I've made a very simple and naive function to retrieve any repeated sub-string within a certain string.
...
2
votes
1
answer
832
views
A batch file executes WinSCP.exe's console mode to download files and log the actions. Upon exit, WinSCP returns:
ERRORLEVEL 0 if the files are successfully ...
I have written this Perl code, and there is still more to add, however I was hoping that I could get some opinions on whether it could be written better.
Specifically, there is a central ...
Is this, technically, a recursive function? It only gets called once by itself, but it cleaned up my code quite a bit, I think. Or, does it needlessly complicate the code?
...
I have a Perl application that allows the user to choose between two different formats for data output (and there will likely be more in the near future). In the heart of the algorithm, the code makes ...