Comprehensive Rust(한국어) 202412Rust uses macros for situations where you want to have a variable number of arguments (no function overloading). • 똑똑한 매크로 (hygienic macro) 는 매크로가 사용되는 스코프에서 의도치않게 변수를 가로채지 않습니다. 사실 러스트 매크로는 완전히 hygenic the sum of the n-1'th and n-2'th Fibonacci numbers. Write a function fib(n) that calculates the n'th Fibonacci number. When will this function panic? fn fib(n: u32) -> u32 { if n <= 2 { // 기본 사례입니다. (예를 들어 C) 와반대임에 유의하시기 바랍니다. 마찬가지로, 리턴 타입도 함수 의 시작이아닌 가장 뒷부분에 선언합니다. • The last expression in a function body (or any block) becomes the return value. Simply omit the ; at the end of the expression. The0 码力 | 369 页 | 1.29 MB | 10 月前3
Comprehensive RustRust uses macros for situations where you want to have a variable number of arguments (no function overloading). • 똑똑한 매크로 (hygienic macro) 는 매크로가 사용되는 스코프에서 의도치않게 변수를 가로채지 않습니다. 사실 러스트 매크로는 완전히 hygenic the sum of the n-1'th and n-2'th Fibonacci numbers. Write a function fib(n) that calculates the n'th Fibonacci number. When will this function panic? fn fib(n: u32) -> u32 { if n <= 2 { // 기본 사례입니다. (예를 들어 C) 와반대임에 유의하시기 바랍니다. 마찬가지로, 리턴 타입도 함수 의 시작이아닌 가장 뒷부분에 선언합니다. • The last expression in a function body (or any block) becomes the return value. Simply omit the ; at the end of the expression. The0 码力 | 368 页 | 1.29 MB | 1 年前3
PlantUML 을사용해서 UML 그리기 - PlantUML 언어참조가이드(Version 1.2019.9)@startuml !unquoted function SALT($x) "{{ salt %invoke_void_func("_"+$x) }}" as $x !endfunction !function _choose() {+ an example choose one option ()one ()two [ok] } !endfunction !function _wait() {+ please wait operation in progress <&clock> [cancel] } !endfunction !function _success() {+ success congratulations! [ok] } !endfunction !function _error() {+ error failed, sorry [ok] } !endfunction (*) and !definelong anymore. Use !function and variable definition instead. !define should be replaced by return function and !definelong should be replaced by void function. • !include now allows multiple0 码力 | 172 页 | 1.97 MB | 1 年前3
PlantUML 1.2019.6 언어참조가이드@startuml !unquoted function SALT($x) "{{ salt %invoke_void_func("_"+$x) }}" as $x !endfunction !function _choose() {+ an example choose one option ()one ()two [ok] } !endfunction !function _wait() {+ please wait operation in progress <&clock> [cancel] } !endfunction !function _success() {+ success congratulations! [ok] } !endfunction !function _error() {+ error failed, sorry [ok] } !endfunction (*) finally removed in some long term future). • You should not use !define and !definelong anymore. Use !function and variable definition instead • !include allows now multiple inclusions : you don't have to use0 码力 | 172 页 | 1.95 MB | 1 年前3
PlantUML 을사용해서 UML 그리기 - PlantUML 언어참조가이드(Version 1.2020.23)should not use !define and !definelong anymore. Use !function, !procedure or variable defi- nition instead. – !define should be replaced by return !function – !definelong should be replaced by !procedure String (str) - these must be surrounded by single quote or double quote. Variables created outside function are global, that is you can access them from everywhere (including from func- tions). You can emphasize destroyed when the procedure ends. 20.7 Return function [!function, !endfunction] A return function does not output any text. It just define a function that you can call: • directly in variable definition0 码力 | 307 页 | 3.16 MB | 1 年前3
PlantUML 1.2020.22 언어참조가이드should not use !define and !definelong anymore. Use !function, !procedure or variable defi- nition instead. – !define should be replaced by return !function – !definelong should be replaced by !procedure String (str) - these must be surrounded by single quote or double quote. Variables created outside function are global, that is you can access them from everywhere (including from func- tions). You can emphasize destroyed when the procedure ends. 20.7 Return function [!function, !endfunction] A return function does not output any text. It just define a function that you can call: • directly in variable definition0 码力 | 295 页 | 3.08 MB | 1 年前3
PlantUML 1.2021.1 언어참조가이드should not use !define and !definelong anymore. Use !function, !procedure or variable definition instead. – !define should be replaced by return !function – !definelong should be replaced by !procedure. String (str) - these must be surrounded by single quote or double quote. Variables created outside function are global, that is you can access them from everywhere (including from functions). You can emphasize $addCommonMethod() toString() hashCode() PlantUML 언어참조가이드 (1.2021.1) 342 / 385 24.7 Return function [!function, !endfunction] 24 PREPROCESSING !endprocedure $init_class("foo1") $init_class("foo2") $msg("foo1"0 码力 | 386 页 | 4.12 MB | 1 年前3
PlantUML 1.2021.2 언어참조가이드should not use !define and !definelong anymore. Use !function, !procedure or variable definition instead. – !define should be replaced by return !function – !definelong should be replaced by !procedure. String (str) - these must be surrounded by single quote or double quote. Variables created outside function are global, that is you can access them from everywhere (including from functions). You can emphasize $addCommonMethod() toString() hashCode() PlantUML 언어참조가이드 (1.2021.2) 347 / 390 25.7 Return function [!function, !endfunction] 25 PREPROCESSING !endprocedure $init_class("foo1") $init_class("foo2") $msg("foo1"0 码力 | 391 页 | 4.17 MB | 1 年前3
PlantUML 1.2021.3 언어참조가이드should not use !define and !definelong anymore. Use !function, !procedure or variable definition instead. – !define should be replaced by return !function – !definelong should be replaced by !procedure. String (str) - these must be surrounded by single quote or double quote. Variables created outside function are global, that is you can access them from everywhere (including from functions). You can emphasize $addCommonMethod() toString() hashCode() PlantUML 언어참조가이드 (1.2021.2) 363 / 407 25.7 Return function [!function, !endfunction] 25 PREPROCESSING !endprocedure $init_class("foo1") $init_class("foo2") $msg("foo1"0 码力 | 408 页 | 4.32 MB | 1 年前3
PlantUML 을사용해서 UML 그리기 - PlantUML 언어참조가이드(Version 1.2023.11)
variable definition and usage, see more details on Preprocessing-JSON page) Variables created outside function are global, that is you can access them from everywhere (including from functions). You can emphasize $source --> $destination !endprocedure PlantUML 언어참조가이드 (1.2023.11) 501 / 551 25.6 Return function [!function, !endfunction] 25 PREPROCESSING !procedure $init_class($name) class $name { $addCommonMethod() destroyed when the procedure ends. 25.6 Return function [!function, !endfunction] A return function does not output any text. It just define a function that you can call: • directly in variable definition0 码力 | 552 页 | 7.88 MB | 1 年前3
共 15 条
- 1
- 2













