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
F Sharp (programming language)
(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!
===Imperative programming=== F# support for imperative programming includes * <code>for</code> [[Control flow#Loops|loops]] * <code>while</code> [[Control flow#Loops|loops]] * [[array data structure|arrays]], created with the <code>[| ... |]</code> syntax * [[Associative array|hash table]], created with the <code>dict [ ... ]</code> syntax or <code>System.Collections.Generic.Dictionary<_,_></code> type. Values and record fields can also be labelled as <code>mutable</code>. For example: <syntaxhighlight lang="fsharp"> // Define 'x' with initial value '1' let mutable x = 1 // Change the value of 'x' to '3' x <- 3 </syntaxhighlight> Also, F# supports access to all CLI types and objects such as those defined in the <code>System.Collections.Generic</code> namespace defining imperative data structures.
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)