Default parameters question


 
Thread Tools Search this Thread
Operating Systems Linux Default parameters question
# 1  
Old 11-12-2008
Default parameters question

Hey guys I'm working on an extra credit question for my programming languages class;

Does a program run faster when the programmer does not specify values for the optional parameters in a subroutine call?

I believe the program will run faster because of the fact that it does not need to evaluate any parameters coming into the function bur rather use the default variables in places where the parameters would have been specified. Am I anywhere even close for this question? Any help would be appreciated. thanks in advance.
# 2  
Old 11-12-2008
# 3  
Old 11-12-2008
Oh ok sorry. I'm pretty new to this. I'll make sure to check out the rules. Thanks for your help anyway.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Default values for positional parameters - dummy question I think

Hi, Sorry for a dummy question I believe. I am just wanting to know how do I assign a default $1 argument if one is not provided. At the moment, I am doing something like below: arg1="${1:-foo}"And then I check $arg1 in case/esac. I am just wondering if there is a way for me to simply do... (3 Replies)
Discussion started by: newbie_01
3 Replies

2. Shell Programming and Scripting

Bash Positional Parameters Question

In a Bash script I used getopts command to let a user does something regards to the selected options. The question is: How do you find out what is the name of the file that user inserted in the command line like the following: The good part is this file is always the last argument in the... (2 Replies)
Discussion started by: bashily
2 Replies

3. Shell Programming and Scripting

Question about parameters in ssh

Hello where I can find or can anybody send me a full list with parameters of ssh. I hope to understand what I mean. For exam -xpvf (tar -xpvf file.tar.gz) -x -p -v -f what do any of these parameters I have command for extract tar.gz file but I want to do this without folder but I don't know what... (2 Replies)
Discussion started by: gladiator6
2 Replies

4. Shell Programming and Scripting

Question on passing multiple parameters in if

Hi All, My target is to find the list of orphan processes running and i issue the below command with some exception ids. ps -ef | egrep -v "root|system|admin" | awk '{if ($3 == 1) print $1",\t"$2",\t"$3}' but this will exclude the process having the word 'root' and executing under different... (1 Reply)
Discussion started by: Arunprasad
1 Replies

5. Solaris

Which file is read by kernel to set its default system kernel parameters values?

Hi gurus Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies

6. AIX

tuning network parameters : parameters not persist after reboot

Hello, On Aix 5.2, we changed the parameters tcp_keepinit, tcp_keepintvl and tcp_keepidle with the no command. tunrestore -R is present in inittab in the directory /etc/tunables we can clearly see the inclusion of parameters during reboot, including the file lastboot.log ... (0 Replies)
Discussion started by: dantares
0 Replies

7. Shell Programming and Scripting

Setting "default" positional parameters (in bash)

Hi, I have a script that processes the positional parameters provided on the command line, or - if none are provided - uses some defaults instead. I've currently got it written as follows, which works like a charm, but I was wondering if there is a different/other/better/... way of doing... (2 Replies)
Discussion started by: pvdb
2 Replies

8. Shell Programming and Scripting

More than nine parameters

Hi, please tell me the systax for passing 11 variables(including 4compulsory variables) in shell program. ORA_USERPASS=`echo $1` USERID=`echo $2` USERNAME=`echo $3` REQUESTID=`echo $4` P5=`echo $5` P6=`echo $6` P7=`echo $7` P8=`echo $8` P9=`echo $9` shift P10=`echo $9` shift... (3 Replies)
Discussion started by: anitha126
3 Replies

9. Shell Programming and Scripting

parameters

I have a script that needs to check if the given parameters are a combination of 0123456789 and not a word or another irelevant character.please help (6 Replies)
Discussion started by: aekaramg20
6 Replies

10. Cybersecurity

AIX: Default Password Parameters

I am working on AIX flavor of Unix and was trying to run a script to obtain default settings of user passwords. The script uses the command to obtain default valid user attributes for: /etc/security/user for some reason, the message says- cat: cannot open /etc/security/user... (1 Reply)
Discussion started by: eysheikah
1 Replies
Login or Register to Ask a Question