Key and employees. The following tokens behave as keyword combinations in modifier listings of conditions and certainly will be utilized for identifiers various other contexts:

Key and employees. The following tokens behave as keyword combinations in modifier listings of conditions and certainly will be utilized for identifiers various other contexts:

Heavy combination of keywords

The next tokens are invariably translated as key phrases and can’t be utilized for identifiers:

class reports a course

does starts a do/while loop (circle with postcondition)

also identifies the department of an if manifestation and that’s completed after the problem happens to be incorrect

false points out the ‚false‘ importance of the Boolean means

specifies the item getting iterated in a for program

can be used as an infix user to check https://hookupdate.net/sugar-daddies-uk/bristol/ on that an advantage is associated with a variety, a collection or any other enterprise that defines the ‚contains‘ way

is employed in when expression for the same reason

mark a kind vardeenhet as contravariant

can be used as an user evaluate that an advantages doesn’t are members of an assortment, a series or some other enterprise that defines the ‚contains‘ way

is utilized in as soon as construction for a similar goal

program declares a screen

is employed in as soon as construction for a similar function

is employed in when expressions for the same function

null are a constant symbolizing an item address which doesn’t suggest any subject

accurate points out the ‚true‘ property value the Boolean kind

typealias declares a sort alias

typeof reserved for potential use

val reports a read-only residence or neighborhood adjustable

var declares a mutable assets or regional varying

when begins an any time phrase (performs on the list of offered divisions)

while starts quite some time hook (cycle with precondition)

Mellow key

All of the following tokens work as keyword combinations within the setting after being relevant and certainly will be used as identifiers various other contexts:

compelling recommendations a vibrant enter in Kotlin/JS signal

appreciate using class key term reports an inline type

Modifier keyword phrases

real means a platform-specific execution in multiplatform plans

theoretical spots a category or associate as theoretical

annotation reports an annotation type

friend reports a companion thing

const scars home as a compile-time constant

enum reports an enumeration

trust markings a declaration as platform-specific, expecting an implementation in system components.

external spots an announcement as applied not just in Kotlin (available through JNI or in JavaScript)

infix makes it possible for phoning a feature in infix writing

inner assists discussing the exterior classroom example from a nested course

interior marks an affirmation as visible with the current economic section

out scars a kind vardeenhet as covariant

override scars an associate as a supersede of a superclass associate

open public spots a resolution as noticeable everywhere

reified mark a type parameter of an inline work as available at runtime

secured declares a closed school (a class with restricted subclassing)

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

tailrec markings a be tail-recursive (permitting the compiler to displace recursion with version)

Specific identifiers

The following identifiers become defined by the compiler in particular contexts that can also be utilized for regular identifiers some other contexts:

area is employed inside a residential property accessor to mention into backing field associated with the assets

Workers and specialized emblems

Kotlin holds here operators and specialized designs:

&& , || , ! – rational ‚and‘, ‚or‘, ’not‘ workers (for bitwise functions, use corresponding infix functionality)

== , != – equality employees (converted to calls of equals() for non-primitive kinds)

, > , , >= – comparison workers (interpreted to phone calls of compareTo() for non-primitive sort)

[ , ] – indexed access user (render to telephone calls of consider along with )

?. executes a secure telephone call (phone calls a technique or accesses a house when the recipient was non-null)

?: normally takes the right-hand value if the left-hand worth is definitely null (the elvis user)

: classify a name from a sort in conditions

? represents a sort as nullable

sets apart the guidelines and body of a lambda concept

split the details and homecoming kind testimony in a purpose type

sets apart the disorder and body of an any time phrase branch

highlights or mention a loop name

introduces or recommendations a lambda tag

; divides multiple assertions for a passing fancy series

$ mention a changeable or term in a series layout

replacements an unused quantity in a lambda phrase

substitutes an untouched vardeenhet in a destructuring declaration

Menü schließen