PlantUML 1.2020.23 Guía de Referencia del Lenguaje
replaced by builtin functions (for example %date()) • When calling a legacy !definelong macro with no arguments, you do have to use parenthesis. You have to use my_own_definelong() because my_own_definelong without Default argument value In both procedure and return functions, you can define default values for arguments. Guía de Referencia del Lenguaje PlantUML (1.2020.23) 273 / 304 20.9 Unquoted procedure or function Alice -> Bob : Just one more $inc(3) Alice -> Bob : Add two to three : $inc(3, 2) @enduml Only arguments at the end of the parameter list can have default values. @startuml !procedure defaulttest($x,0 码力 | 305 页 | 3.11 MB | 1 年前3PlantUML 1.2020.22 Guía de Referencia del Lenguaje
replaced by builtin functions (for example %date()) • When calling a legacy !definelong macro with no arguments, you do have to use parenthesis. You have to use my_own_definelong() because my_own_definelong without Default argument value In both procedure and return functions, you can define default values for arguments. Guía de Referencia del Lenguaje PlantUML (1.2020.22) 261 / 292 20.9 Unquoted procedure or function Alice -> Bob : Just one more $inc(3) Alice -> Bob : Add two to three : $inc(3, 2) @enduml Only arguments at the end of the parameter list can have default values. @startuml !procedure defaulttest($x,0 码力 | 293 页 | 3.02 MB | 1 年前3PlantUML 1.2021.2 Guía de Referencia del Lenguaje
replaced by builtin functions (for example %date()) • When calling a legacy !definelong macro with no arguments, you do have to use parenthesis. You have to use my_own_definelong() because my_own_definelong without Default argument value In both procedure and return functions, you can define default values for arguments. @startuml !function $inc($value, $step=1) !return $value + $step !endfunction Alice -> Bob : : Just one more $inc(3) Alice -> Bob : Add two to three : $inc(3, 2) @enduml Only arguments at the end of the parameter list can have default values. Guía de Referencia del Lenguaje PlantUML (1.2021.2)0 码力 | 389 页 | 4.12 MB | 1 年前3PlantUML 1.2021.1 Guía de Referencia del Lenguaje
replaced by builtin functions (for example %date()) • When calling a legacy !definelong macro with no arguments, you do have to use parenthesis. You have to use my_own_definelong() because my_own_definelong without Default argument value In both procedure and return functions, you can define default values for arguments. @startuml !function $inc($value, $step=1) !return $value + $step !endfunction Alice -> Bob : : Just one more $inc(3) Alice -> Bob : Add two to three : $inc(3, 2) @enduml Only arguments at the end of the parameter list can have default values. Guía de Referencia del Lenguaje PlantUML (1.2021.1)0 码力 | 384 页 | 4.07 MB | 1 年前3PlantUML 1.2021.3 Guía de Referencia del Lenguaje
replaced by builtin functions (for example %date()) • When calling a legacy !definelong macro with no arguments, you do have to use parenthesis. You have to use my_own_definelong() because my_own_definelong without Default argument value In both procedure and return functions, you can define default values for arguments. @startuml !function $inc($value, $step=1) !return $value + $step !endfunction Alice -> Bob : : Just one more $inc(3) Alice -> Bob : Add two to three : $inc(3, 2) @enduml Only arguments at the end of the parameter list can have default values. Guía de Referencia del Lenguaje PlantUML (1.2021.2)0 码力 | 407 页 | 4.28 MB | 1 年前3PlantUML 1.2023.11 Guía de Referencia del Lenguaje
Default argument value In both procedure and return functions, you can define default values for arguments. @startuml !function $inc($value, $step=1) !return $value + $step !endfunction Alice -> Bob : PlantUML (1.2023.11) 482 / 530 25.8 Unquoted procedure or function [!unquoted] 25 PREPROCESSING Only arguments at the end of the parameter list can have default values. @startuml !procedure defaulttest($x, the unquoted keyword to indicate that a function or a procedure does not require quotes for its arguments. @startuml !unquoted function id($text1, $text2="FOO") !return $text1 + $text2 alice -> bob :0 码力 | 531 页 | 7.53 MB | 1 年前3PlantUML 1.2019.9 Guía de Referencia del Lenguaje
replaced by builtin functions (for example %date()) • When calling a legacy !definelong macro with no arguments, you do have to use parenthesis. You have to use my_own_definelong() because my_own_definelong without 6 Default argument value In both return and void functions, you can define default values for arguments. @startuml !function $inc($value, $step=1) !return $value + $step !endfunction Alice -> Bob : : Just one more $inc(3) Alice -> Bob : Add two to three : $inc(3, 2) @enduml Only arguments at the end of the parameter list can have default values. @startuml !function defaulttest($x, $y="DefaultY"0 码力 | 172 页 | 1.93 MB | 1 年前3PlantUML 1.2019.6 Guía de Referencia del Lenguaje
replaced by builtin functions (for example %date()) • When calling a legacy !definelong macro with no arguments, you do have to use parenthesis. That is you have to use my_own_definelong() because my_own_definelong possible to use the unquoted keyword to indicate that a function does not require quotes for its arguments. @startuml !unquoted function id($text1, $text2="FOO") return $text1 + $text2 Guía de Referencia the length of a String %strlen("foo") 3 in the example %substr Extract a substring. Takes 2 or 3 arguments| %substr("abcdef", 3, 2) "de" in the example %strpos Search a substring in a string %strpos("abcdef"0 码力 | 172 页 | 1.91 MB | 1 年前3PlantUML 1.2019.1 Guía de Referencia del Lenguaje
definition You can also define macro with arguments. @startuml !define module(x) component x <> module(ABC) module(XYZ) @enduml Macro can have several arguments. @startuml !define send(a,b,c) a->b 0 码力 | 147 页 | 1.85 MB | 1 年前3PlantUML 1.2019.4 Guía de Referencia del Lenguaje
definition You can also define macro with arguments. @startuml !define module(x) component x <> module(ABC) module(XYZ) @enduml Macro can have several arguments. @startuml !define send(a,b,c) a->b 0 码力 | 166 页 | 1.82 MB | 1 年前3
共 13 条
- 1
- 2