Rust 程序设计语言 简体中文版 1.85.0dice_roll { 3 => add_fancy_hat(), 7 => remove_fancy_hat(), other => move_player(other), } fn add_fancy_hat() {} fn remove_fancy_hat() {} fn move_player(num_spaces: match dice_roll { 3 => add_fancy_hat(), 7 => remove_fancy_hat(), _ => reroll(), } fn add_fancy_hat() {} fn remove_fancy_hat() {} fn reroll() {} 这个例子也满足穷尽性要求,因为 match dice_roll { 3 => add_fancy_hat(), 7 => remove_fancy_hat(), _ => (), } fn add_fancy_hat() {} fn remove_fancy_hat() {} 在这里,我们明确告诉 Rust 我们不会使用与前面模式不匹配的值,并且这种情况下我们不想0 码力 | 562 页 | 3.23 MB | 23 天前3
Julia 1.11.4For example, the variable name δ can be entered by typing \delta-tab, or even α̂⁽²⁾ by \alpha-tab-\hat- tab-\^(2)-tab. (If you find a symbol somewhere, e.g. in someone else's code, that you don't know the section on The Julia REPL. JULIA_ERROR_COLOR The formatting Base.error_color() (default: light red, "\033[91m") that errors should have at the termi- nal.CHAPTER 30. ENVIRONMENT VARIABLES 397 JULIA_WARN_COLOR @code_warntype is that non-concrete types are displayed in red; since this document is written in Markdown, which has no color, in this document, red text is denoted by uppercase. At the top, the inferred0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.5 DocumentationFor example, the variable name δ can be entered by typing \delta-tab, or even α̂⁽²⁾ by \alpha-tab-\hat- tab-\^(2)-tab. (If you find a symbol somewhere, e.g. in someone else's code, that you don't know the section on The Julia REPL. JULIA_ERROR_COLOR The formatting Base.error_color() (default: light red, "\033[91m") that errors should have at the termi- nal.CHAPTER 30. ENVIRONMENT VARIABLES 397 JULIA_WARN_COLOR @code_warntype is that non-concrete types are displayed in red; since this document is written in Markdown, which has no color, in this document, red text is denoted by uppercase. At the top, the inferred0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.6 Release NotesFor example, the variable name δ can be entered by typing \delta-tab, or even α̂⁽²⁾ by \alpha-tab-\hat- tab-\^(2)-tab. (If you find a symbol somewhere, e.g. in someone else's code, that you don't know the section on The Julia REPL. JULIA_ERROR_COLOR The formatting Base.error_color() (default: light red, "\033[91m") that errors should have at the termi- nal.CHAPTER 30. ENVIRONMENT VARIABLES 397 JULIA_WARN_COLOR @code_warntype is that non-concrete types are displayed in red; since this document is written in Markdown, which has no color, in this document, red text is denoted by uppercase. At the top, the inferred0 码力 | 2007 页 | 6.73 MB | 3 月前3
julia 1.10.10For example, the variable name δ can be entered by typing \delta-tab, or even α̂⁽²⁾ by \alpha-tab-\hat- tab-\^(2)-tab. (If you find a symbol somewhere, e.g. in someone else's code, that you don't know the section on The Julia REPL. JULIA_ERROR_COLOR The formatting Base.error_color() (default: light red, "\033[91m") that errors should have at the termi- nal. JULIA_WARN_COLOR The formatting Base.warn_color() @code_warntype is that non-concrete types are displayed in red; since this document is written in Markdown, which has no color, in this document, red text is denoted by uppercase.CHAPTER 34. PERFORMANCE TIPS0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.9For example, the variable name δ can be entered by typing \delta-tab, or even α̂⁽²⁾ by \alpha-tab-\hat- tab-\^(2)-tab. (If you find a symbol somewhere, e.g. in someone else's code, that you don't know the section on The Julia REPL. JULIA_ERROR_COLOR The formatting Base.error_color() (default: light red, "\033[91m") that errors should have at the termi- nal. JULIA_WARN_COLOR The formatting Base.warn_color() @code_warntype is that non-concrete types are displayed in red; since this document is written in Markdown, which has no color, in this document, red text is denoted by uppercase.CHAPTER 34. PERFORMANCE TIPS0 码力 | 1692 页 | 6.34 MB | 3 月前3
julia 1.13.0 DEVFor example, the variable name δ can be entered by typing \delta-tab, or even α̂⁽²⁾ by \alpha-tab-\hat- tab-\^(2)-tab. (If you find a symbol somewhere, e.g. in someone else's code, that you don't know the section on The Julia REPL. JULIA_ERROR_COLOR The formatting Base.error_color() (default: light red, "\033[91m") that errors should have at the termi- nal.CHAPTER 30. ENVIRONMENT VARIABLES 401 JULIA_WARN_COLOR @code_warntype is that non-concrete types are displayed in red; since this document is written in Markdown, which has no color, in this document, red text is denoted by uppercase. At the top, the inferred0 码力 | 2058 页 | 7.45 MB | 3 月前3
Julia 1.12.0 Beta4For example, the variable name δ can be entered by typing \delta-tab, or even α̂⁽²⁾ by \alpha-tab-\hat- tab-\^(2)-tab. (If you find a symbol somewhere, e.g. in someone else's code, that you don't know the section on The Julia REPL. JULIA_ERROR_COLOR The formatting Base.error_color() (default: light red, "\033[91m") that errors should have at the termi- nal.CHAPTER 30. ENVIRONMENT VARIABLES 401 JULIA_WARN_COLOR @code_warntype is that non-concrete types are displayed in red; since this document is written in Markdown, which has no color, in this document, red text is denoted by uppercase. At the top, the inferred0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta3For example, the variable name δ can be entered by typing \delta-tab, or even α̂⁽²⁾ by \alpha-tab-\hat- tab-\^(2)-tab. (If you find a symbol somewhere, e.g. in someone else's code, that you don't know the section on The Julia REPL. JULIA_ERROR_COLOR The formatting Base.error_color() (default: light red, "\033[91m") that errors should have at the termi- nal.CHAPTER 30. ENVIRONMENT VARIABLES 401 JULIA_WARN_COLOR @code_warntype is that non-concrete types are displayed in red; since this document is written in Markdown, which has no color, in this document, red text is denoted by uppercase. At the top, the inferred0 码力 | 2057 页 | 7.44 MB | 3 月前3
julia 1.12.0 beta1For example, the variable name δ can be entered by typing \delta-tab, or even α̂⁽²⁾ by \alpha-tab-\hat- tab-\^(2)-tab. (If you find a symbol somewhere, e.g. in someone else's code, that you don't know the section on The Julia REPL. JULIA_ERROR_COLOR The formatting Base.error_color() (default: light red, "\033[91m") that errors should have at the termi- nal.CHAPTER 30. ENVIRONMENT VARIABLES 401 JULIA_WARN_COLOR @code_warntype is that non-concrete types are displayed in red; since this document is written in Markdown, which has no color, in this document, red text is denoted by uppercase. At the top, the inferred0 码力 | 2047 页 | 7.41 MB | 3 月前3
共 13 条
- 1
- 2













