Skip to content

Commit

Permalink
Update task.md (#175)
Browse files Browse the repository at this point in the history
language checked
  • Loading branch information
stephen-hero authored Dec 15, 2023
1 parent 0c5b265 commit c3e897b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions TheFirstDateWithProgramming/programEntryPointTheory/task.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Every program in any programming language has an **entry point**.
As a rule, it is a special place in the program that controls everything
that happens around.
Every program written in any programming language has an **entry point**.
As a rule, it is a special section in the program that controls all
subsequent operations.

In Kotlin, the [entry point](https://kotlinlang.org/docs/basic-syntax.html#program-entry-point) is the special `main` function, which looks like this:
```kotlin
Expand All @@ -9,13 +9,13 @@ fun main() {
}
```

Everything that happens _inside_ the function (between the curly braces)
will be executed while the program is running.
Everything that happens _within_ the function (between the curly braces)
will be executed while the program runs.
This function can be placed in _any_ file in your project;
you can even add _several_ `main` functions to one project.
In the latter case, you can choose by yourself which entry point you want to run.
In the latter case, you can choose which entry point to run.

To `run` a program, you should click on the **green triangle** near the `main` function,
To `run` a program, you should click on the **green triangle** next to the `main` function,
and then the result of the program will be displayed in the _console_ inside the IDE:

![Program entry point and console](../../utils/src/main/resources/images/part1/first.date/entry_point.png "Program entry point and console")

0 comments on commit c3e897b

Please sign in to comment.