Keywords and phrases and employees. All of the following tokens will always translated as key words and cannot be utilized for identifiers

Keywords and phrases and employees. All of the following tokens will always translated as key words and cannot be utilized for identifiers

Intense keyword phrases

class declares a category

manage starts a do/while trap (cycle with postcondition)

also specifies the division of an if expression and is performed whenever the condition try untrue

fake specifies the ‘false’ property value the Boolean sort

specifies the thing becoming iterated in a for trap

is utilized as an infix driver to check out that a value is associated with a range, a collection or other entity that defines the ‘contains’ method

is employed in if expressions for the same objective

mark a kind quantity as contravariant

is used as an user to evaluate that an advantages will not belong to a selection, a collection or other business that determine the ‘contains’ strategy

is employed in if expression for similar reason

user interface reports an interface

is employed in whenever expression for the very same objective

can be used in when construction for a similar factor

nothing was a continuing presenting a subject mention that doesn’t suggest any thing

real specifies the ‘true’ value of the Boolean sort

typealias declares a kind alias

typeof restricted to potential use

val reports a read-only home or hometown adjustable

var reports a mutable house or nearby adjustable

once starts an once appearance (performs one of many furnished limbs)

while starts a little while program (program with prerequisite)

Plush keyword combinations

Listed here tokens behave as keyword phrases during the perspective while they are pertinent and certainly will be utilized for identifiers various other contexts:

powerful recommendations a vibrant key in Kotlin/JS code

advantage using class key term reports an inline classroom

Modifier keyword

The subsequent tokens work as search phrases in modifier listings of conditions that can also be utilized for identifiers in other contexts:

genuine means a platform-specific execution in multiplatform jobs

theoretical mark a course or member as abstract

annotation reports an annotation course

partner reports a spouse item

const scars a house as a compile-time continuous

enum declares an enumeration

wish spots a statement as platform-specific, wanting an execution in program components.

additional scars a resolution as applied perhaps not in Kotlin (available through JNI or in JavaScript)

infix makes it possible for dialing a work in infix notation

inner allows writing about the outside course circumstances from a nested school

interior spots a https://hookupdate.net/it/international-dating-it/ declaration as obvious with the current economic section

out marks a kind vardeenhet as covariant

supersede mark a member as an override of a superclass manhood

public spots a resolution as apparent everywhere

reified spots a type vardeenhet of an inline be accessible at runtime

secured reports an enclosed course (a class with confined subclassing)

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

tailrec scars a function as tail-recursive (permitting the compiler to displace recursion with iteration)

Particular identifiers

The following identifiers tend to be described because compiler in specific contexts and may be used as normal identifiers various other contexts:

subject is utilized inside a home accessor to mention into the assistance industry associated with residence

Workers and specialized icons

Kotlin helps this employees and particular representations:

&& , || , ! – sensible ‘and’, ‘or’, ‘not’ employees (for bitwise functions, need corresponding infix services)

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

, > , , >= – contrast employees (interpreted to messages of compareTo() for non-primitive varieties)

[ , ] – indexed gain access to owner (equated to phone calls of attain and place )

?. does a good ring (telephone calls a way or accesses real estate in the event that radio are non-null)

?: usually takes the right-hand value if your left-hand appreciate was null (the elvis owner)

: split a name from a type in conditions

? marks a sort as nullable

distinguishes the criteria and the entire body of a lambda expression

separates the details and repay means statement in a work means

split the illness and the body of an if phrase branch

highlights or recommendations a circle name

highlights or mention a lambda tag

; divides multiple words on a single line

$ sources an adjustable or term in a line format

replacements an abandoned vardeenhet in a lambda expression

substitutes an untouched quantity in a destructuring statement

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *