Nim 2.0.8 Manual
of the platform. Indentation Nim's standard grammar describes an indentation sensitive language. This means that all the control structures are recognized by indentation. Indentation consists only of tabulators are not allowed. The indentation handling is implemented as follows: The lexer annotates the following token with the preceding number of spaces; indentation is not a separate token. This trick with only 1 token of lookahead. The parser uses a stack of indentation levels: the stack consists of integers counting the spaces. The indentation information is queried at strategic places in the parser0 码力 | 132 页 | 5.73 MB | 1 年前3Google Java Style Guide
whitespace characters in string and character literals are escaped. 2. Tab characters are not used for indentation. 2.3.2 Special escape sequences For any character that has a special escape sequence (\b, \t multiple blocks: if/else-if/else or try/catch/finally). Example: void doNothing() {} 4.2 Block indentation: +2 spaces Each time a new block or block-like construct is opened, the indent increases by two When there are multiple continuation lines, indentation may be varied beyond +4 as desired. In general, two continuation lines use the same indentation level if and only if they begin with syntactically0 码力 | 19 页 | 84.76 KB | 1 年前3Google Python Style Guide
Decorators Threading Power Features 1 Python Style Rules Semicolons Line length Parentheses Indentation Blank Lines Whitespace Shebang Line Comments Classes Strings Files and Sockets TODO Comments Imports 0/csv_file_name_extension_full_specification.html Make note of the indentation of the elements in the line continuation examples above; see the indentation section for explanation. Parentheses link Use parentheses bar() return foo for (x, y) in dict.items(): ... No: if (x): bar() if not(x): bar() return (foo) Indentation link Indent your code blocks with 4 spaces. Never use tabs or mix tabs and spaces. In cases0 码力 | 30 页 | 94.81 KB | 1 年前3The Python Handbook
basics of working with Python 5.1. Variable 5.2. Expressions and statement 5.3. Comment 5.4. Indentation 6. Data Types 7. Operators 7.0.1. Assignment operator 7.0.2. Arithmetic operator 7.0.3. Comparison comment: #this is a commented line name = "Roger" # this is an inline comment 5.4. Indentation Indentation in Python is meaningful. You cannot indent randomly like this: name = "Flavio" print(name) print(name) Some other languages do not have meaningful whitespace, but in Python, indentation matters. In this case, if you try to run this program you would get a IndentationError: unexpected indent0 码力 | 93 页 | 7.31 MB | 1 年前3Haskell 2010 Language Report
whenever the open brace is omitted after the keyword where, let, do, or of. When this happens, the indentation of the next lexeme (whether or not on a new line) is remembered and the omitted open brace is inserted (a close brace is inserted). If the indentation of the non-brace lexeme immediately following a where, let, do or of is less than or equal to the current indentation level, then instead of starting a layout tuple was detected, and (c) the close brace at the very end, inserted because of the column 0 indentation of the end-of-file token. 14 CHAPTER 2. LEXICAL STRUCTURE module AStack( Stack, push, pop, top0 码力 | 329 页 | 1.43 MB | 1 年前3Pandoc User’s Guide (April 7, 2024)
... indent if true, pandoc will use document class settings for indentation (the default LaTeX template otherwise removes indentation and adds space between paragraphs) linestretch adjusts line spacing ConTeXt Headers and Footers); repeat up to four times for different placement indenting controls indentation of paragraphs, e.g. yes,small,next (see ConTeXt Indenta- tion); repeat for multiple options 49 optional space, that space will be considered part of the block quote marker and not part of the indentation of the contents. Thus, to put an indented code block in a block quote, you need five spaces after0 码力 | 168 页 | 475.29 KB | 1 年前3Agda User Manual v2.5.3
mutual postulate primitive private where The first token after the layout keyword decides the indentation of the block. Any token indented more than this is part of the previous statement, a token at the Nat -- also statement 2 one : Nat -- outside the layout block one = suc zero Note that the indentation of the layout keyword does not matter. An Agda file contains one top-level layout block, with Documentation, Release 2.5.3 f : Nat → Nat f n = suc n g : Nat → Nat → Nat g n m = m Note that we use indentation to indicate which definitions are part of a module. In the example f is in the module Main.B and0 码力 | 135 页 | 600.40 KB | 1 年前3Agda User Manual v2.6.0
mutual postulate primitive private where The first token after the layout keyword decides the indentation of the block. Any token indented more than this is part of the previous statement, a token at the one = suc zero 80 Chapter 3. Language Reference Agda User Manual, Release 2.6.0 Note that the indentation of the layout keyword does not matter. An Agda file contains one top-level layout block, with where module B where f : Nat → Nat f n = suc n g : Nat → Nat → Nat g n m = m Note that we use indentation to indicate which definitions are part of a module. In the example f is in the module Main.B and0 码力 | 191 页 | 857.07 KB | 1 年前3Agda User Manual v2.6.0.1
mutual postulate primitive private where The first token after the layout keyword decides the indentation of the block. Any token indented more than this is part of the previous statement, a token at the = suc zero 80 Chapter 3. Language Reference Agda User Manual, Release 2.6.0.1 Note that the indentation of the layout keyword does not matter. An Agda file contains one top-level layout block, with where module B where f : Nat → Nat f n = suc n g : Nat → Nat → Nat g n m = m Note that we use indentation to indicate which definitions are part of a module. In the example f is in the module Main.B and0 码力 | 191 页 | 857.57 KB | 1 年前3Jupyter Notebook 5.1.0 Documentation
features of the web application • In-browser editing for code, with automatic syntax highlighting, indentation, and tab completion/introspection. • The ability to execute code from the browser, with the results configuration works – Example: Changing the notebook’s default indentation setting – Example: Restoring the notebook’s default indentation setting • Persisting configuration settings 4.4 Notebook extensions its configuration attribute with a JSON patch. 9.2 Example - Changing the notebook’s default indentation This example explains how to change the default setting indentUnit for CodeMirror Code Cells:0 码力 | 128 页 | 1.72 MB | 1 年前3
共 598 条
- 1
- 2
- 3
- 4
- 5
- 6
- 60