Home > Mobile >  LF in Kotlin language specification standard for what?
LF in Kotlin language specification standard for what?

Time:12-10

Recently I am learning Kotlin. When I read Kotlin language specification, I meet some problems. I do not understand LF in Kotlin language specification standard for what? In section "1.2.1 Whitespace and comments", LF show as below. "LF: <unicode character Line Feed U 000A>" So LF is short for what, and "unicode character Line Feed U 000A" is what?

CodePudding user response:

I think the answer is already in the question: unicode character Line Feed U 000A

As that implies, LF stands for Line Feed. It's a character, with Unicode value U 000A. It's used* to separate lines within text files — so is treated as whitespace, and is mentioned in the whitespace section of the docs.

There's plenty of information about that character on this site, on the official Unicode site, and on many other sites — all very easy to find with your favourite search engine.

(In fact, a web search is probably a much better place to start when learning a new language than from the language specification, which is highly technical and intended for people writing compilers and similar tools. Even better, start from the official docs — the ‘Basics’ section gives a quick intro, while the later sections go into full detail.)


(* Some platforms use only LF to separate lines; others use the CR character — carriage return, U 000D — followed by LF; and historically some used only CR.)

  • Related