English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i know that it makes running the main program more organized, but im wondering if there are more advantages to running subprograms within a main program

2007-03-26 09:20:12 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

Parallel computing. You can fork a process and you may or may not wait for it to finish. You can then do other things in your main program, or you can have one thread in your main program wait for the forked process to complete and have the other thread do other stuff.

2007-03-26 10:08:03 · answer #1 · answered by Anonymous · 0 0

Reusability -- if you need to perform a similar function in a different program you can use the same subprogram rather than pulling apart the code out of a larger program to replicate what the subprogram does.

2007-03-26 16:43:09 · answer #2 · answered by Chris D 2 · 0 0

So that the main program is not held up by running a process that the subprogram is running.

2007-03-26 16:26:19 · answer #3 · answered by Yoi_55 7 · 0 0

fedest.com, questions and answers