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
Default (computer science)
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!
{{refimprove|date=September 2015}} A '''default''', in [[computer science]], refers to the preexisting [[Value (computer science)|value]] of a user-configurable setting that is assigned to a [[software application]], [[computer program]] or [[Peripheral device|device]]. Such settings are also called '''factory settings''', or '''factory presets''', especially for electronic devices. Default values are standards values that are universal to all instances of the device or model and intended to make the device as accessible as possible "out of the box" without necessitating a lengthy configuration process prior to use. The user only has to modify the default settings according to their personal preferences. In many devices, the user has the option to restore these default settings for one or all options. Such an assignment makes the choice of that setting or value more likely, this is called the [[default effect]]. ==Examples== ===Application software preferences=== One use of default parameters is for initial settings for [[application software]]. For example, the first time a user runs an application it may suggest that the user's delivery address is in the United States. This default might be appropriate if more users of that application were in the US than any other country. If the user selected a new country, it would override the default, and perhaps become the default for the next time the application is used on that computer or by that user. Changing the default for the next run would involve storing user information in some place, such as in [[HTTP cookie|cookies]] on the user's computer for an Internet application.{{citation needed|date=January 2022}} In [[Microsoft Windows]], default [[file association]]s associate applications with file types.<ref>{{Cite web|date=2020-04-23|title=How to configure file associations for IT Pros|url=https://techcommunity.microsoft.com/t5/ask-the-performance-team/how-to-configure-file-associations-for-it-pros/ba-p/1313151|access-date=2022-01-23|website=TECHCOMMUNITY.MICROSOFT.COM|language=en}}</ref> ===Television or computer monitor=== A [[TV]] or computer monitor typically comes with a button to "restore factory presets". This allows the settings for brightness, contrast, color, etc., to be returned to the defaults recommended by the manufacturer. This button may be used when the settings get badly adjusted (say by a toddler playing with the controls). Some "fine-tuning" of the settings may still be needed from the factory settings, but they will likely be closer to the desired settings than random settings. ==In application software== Using a default involves two goals which sometimes conflict: *'''Minimal user interaction should be required.''' Setting defaults to the most commonly selected options serves this purpose. *'''Panel entry errors should be minimized.''' Using defaults will tend to increase errors, as users may leave incorrect default settings selected. In cases where the value can be verified, this is not a severe problem. For example, the delivery country can be checked against the street address or postal codes and any mismatch can generate an error panel displayed to the user, who will then presumably make the correction. In cases where there is no clear majority and the results cannot easily be verified by other available information, such as the gender of the individual, no default should be offered. Some software applications, however, require that default values be supplied. A 1982 [[Apple Computer]] manual for developers warned: "Please do not ever use the word default in a program designed for humans. Default is [[default (finance)|something the mortgage went into]] right before the evil banker stole the Widow Parson's house. There is an exhaustive list of substitutes (previous, automatic, standard, etc.)".<ref name="apple1982">{{cite book | url=http://www.apple2scans.net/files/1982-A2F2116-m-a2e-aiiedg.pdf | title=Apple IIe Design Guidelines | publisher=Apple Computer | author1=Meyers, Joe | author2=Tognazzini, Bruce | year=1982 | pages=37 | access-date=2014-03-11 | archive-date=2015-09-23 | archive-url=https://web.archive.org/web/20150923172720/http://www.apple2scans.net/files/1982-A2F2116-m-a2e-aiiedg.pdf | url-status=dead }}</ref> ==In computer languages== {{anchor|Default parameter}}Many languages in the [[C (programming language)|C]] family (but not C itself, as of [[C11 (C standard revision)|C11]]) allow a function to have ''default'' parameters or [[default argument]]s, that are used if the function is called with omitted parameter specifications. In C and programming languages based on its syntax, the <code>switch</code> statement (which dispatches among a number of alternatives) can make use of the <code>default</code> keyword to provide a case for when no other case matches. In [[Fortran]], the INIT parameter on a declaration defines an initial default value for that variable. In [[Rust (programming language)|Rust]], [[Data type|types]] that implement the <code>Default</code> [[Trait_(computer_programming)#Rust|trait]] can produce a default [[Value (computer science)|value]].<ref>{{cite web |title=Default in std::default - Rust |url=https://doc.rust-lang.org/std/default/trait.Default.html |website=The Rust Standard Library |access-date=10 April 2022}}</ref> For example, the [[Primitive data type|primitive]] integer types in Rust implement the <code>Default</code> trait by returning 0. ==In operating systems== In operating systems using a [[command line interface]], the user types short commands often followed by various parameters and options. == See also == * [[Principle of least astonishment]] * [[Convention over configuration]] ==References== {{reflist}} [[Category:Computing terminology]] [[Category:Computer data]]
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)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Anchor
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Refimprove
(
edit
)
Template:Reflist
(
edit
)