Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Parameter (computer programming)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Named parameters === Some programming languages—such as [[Ada (programming language)|Ada]] and [[Windows PowerShell]]—allow subroutines to have [[named parameter]]s. This allows the calling code to be more [[self-documenting]]. It also provides more flexibility to the caller, often allowing the order of the arguments to be changed, or for arguments to be omitted as needed. PowerShell example: <syntaxhighlight lang="powershell"> function jennifer($adjectiveYoung, $adjectiveOld) { "Young Jennifer: I'm $adjectiveYoung!" "Old Jennifer: I'm $adjectiveOld!" } </syntaxhighlight> <syntaxhighlight lang="ps1con"> PS > jennifer 'fresh' 'experienced' Young Jennifer: I'm fresh! Old Jennifer: I'm experienced! PS > jennifer -adjectiveOld 'experienced' -adjectiveYoung 'fresh' Young Jennifer: I'm fresh! Old Jennifer: I'm experienced! </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)