Keyword phrases and workers. This tokens constantly interpreted as keywords and should not be utilized for identifiers

Keyword phrases and workers. This tokens constantly interpreted as keywords and should not be utilized for identifiers

Solid keyword combinations

class reports a category

does begins a do/while circle (program with postcondition)

also defines the division of an if phrase which is completed as soon as the condition was fake

untrue specifies the ‘false’ importance of the Boolean means

determine the thing are iterated in an as cycle

is used as an infix driver to evaluate that a price is associated with a range, a variety and other thing that defines the ‘contains’ way

is used in when expression for the same mission

marks a sort quantity as contravariant

is used as an operator evaluate that an advantages doesn’t are part of a range, a selection or another thing that determine the ‘contains’ way

can be used in whenever expressions for the same reason

software declares a screen

is employed in when expressions for the same factor

is utilized in any time expression for the same reason

null try a continuing standing for an item guide that doesn’t point out any thing

genuine determine the ‘true’ value of the Boolean sort

typealias declares a kind alias

typeof restricted to upcoming need

val reports a read-only residential property or regional varying

var reports a mutable belongings or regional changeable

when begins an any time manifestation (performs among the offered limbs)

while starts some time program (trap with precondition)

Plush keywords and phrases

Below tokens behave as key words in context while they are pertinent and can also be utilized for identifiers some other contexts:

compelling recommendations a powerful type in Kotlin/JS signal

worth aided by the school key phrase declares an inline school

Modifier keyword combinations

The following tokens become keywords and phrases in modifier databases of conditions and can be used as identifiers in other contexts:

real means a platform-specific application in multiplatform works

abstract scars a class or manhood as conceptual

annotation declares an annotation course

partner declares a spouse target

const markings real estate as a compile-time continuous

enum reports an enumeration

hope markings a resolution as platform-specific, planning on a setup in platform modules.

exterior scars an announcement as executed maybe not in Kotlin (accessible through JNI or in JavaScript)

infix allows phoning a purpose in infix notation

internal allows making reference to the outer school circumstances from a nested classroom

interior scars an affirmation as visible in today’s section

out spots a kind vardeenhet as covariant

override mark an associate as a supersede of a superclass user

people marks a testimony as visible anywhere

reified scars a kind factor of an inline be available at runtime

closed declares a closed classroom (a category with confined subclassing)

suspend spots a features or lambda as suspending (usable as a coroutine)

tailrec marks a be tail-recursive (allowing the compiler to change recursion with version)

Special identifiers

In this article identifiers are actually described by compiler in certain contexts and can be utilized for standard identifiers some other contexts:

area is used inside a property accessor to refer toward the assistance niche associated with the property

Workers and specific designs

Kotlin supports the subsequent providers and unique designs:

&& , || , ! – reasonable ‘and’, ‘or’, ‘not’ operators (for bitwise surgery, incorporate corresponding infix services)

== , != – equivalence workers (translated to contacts of equals() for non-primitive varieties)

, > , , >= – assessment providers (render to telephone calls of compareTo() for non-primitive types)

[ , ] – listed availability manager (render to telephone calls of access and set )

?. works a good contact (dubs one way or accesses a property if your receiver is definitely non-null)

?: requires the right-hand advantage in the event the left-hand importance is definitely null (the elvis user)

: classify a name from a sort in declarations

? signifies a type as nullable

separates the parameters and the entire body of a lambda concept

sets apart the parameters and generate kinds declaration in a work kind

separates the problem and body of an as soon as phrase branch

presents or references a circle label

highlights or mention a lambda label

; divides numerous claims for a passing fancy range

$ sources a varying or manifestation in a series template

substitutes an untouched factor in https://static.locanto.ie/assets/200625_140812/images/bg/promos/dol/ad_like_promos/men/12.png» alt=»donnona nera omone nero incontri»> a lambda concept

substitutes an abandoned vardeenhet in a destructuring testimony

Dejar un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *