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
Entry point
(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!
===Dart=== [[Dart (programming language)|Dart]] is a [[general-purpose programming language]] that is often used for building web and mobile applications. Like many other programming languages, Dart has an entry point that serves as the starting point for a Dart program. The entry point is the first function that is executed when a program runs. In Dart, the entry point is typically a function named <code>main</code> . When a Dart program is run, the Dart runtime looks for a function named <code>main</code> and executes it. Any Dart code that is intended to be executed when the program starts should be included in the <code>main</code> function. Here is an example of a simple <code>main</code> function in Dart: <syntaxhighlight lang="Dart"> void main() { print("Hello, world!"); } </syntaxhighlight> In this example, the <code>main</code> function simply prints the text <code>Hello, world!</code> to the console when the program is run. This code will be executed automatically when the Dart program is run. It is important to note that while the <code>main</code> function is the default entry point for a Dart program, it is possible to specify a different entry point if needed. This can be done using the <code>@pragma("vm:entry-point")</code> annotation in Dart. However, in most cases, the <code>main</code> function is the entry point that should be used for Dart programs.
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)