comparison runtime/doc/vim9.txt @ 19404:7be3663e2f2b

Update runtime files. Commit: https://github.com/vim/vim/commit/ebdf3c964a901fc00c9009689f7cfda478342c51 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 15 21:41:42 2020 +0100 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Sat, 15 Feb 2020 21:45:05 +0100
parents 51bc26d4a393
children b09afbebffee
comparison
equal deleted inserted replaced
19403:b37055372a73 19404:7be3663e2f2b
1 *vim9.txt* For Vim version 8.2. Last change: 2020 Jan 30 1 *vim9.txt* For Vim version 8.2. Last change: 2020 Feb 13
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
229 :def[!] {name}([arguments])[: {return-type} 229 :def[!] {name}([arguments])[: {return-type}
230 Define a new function by the name {name}. The body of 230 Define a new function by the name {name}. The body of
231 the function follows in the next lines, until the 231 the function follows in the next lines, until the
232 matching `:enddef`. 232 matching `:enddef`.
233 233
234 When {return-type} is omitted the return type will be 234 When {return-type} is omitted the function is not
235 decided upon by the first encountered `return` 235 expected to return anything.
236 statement in the function. E.g., for: >
237 return 'message'
238 < The return type will be "string".
239 236
240 {arguments} is a sequence of zero or more argument 237 {arguments} is a sequence of zero or more argument
241 declarations. There are three forms: 238 declarations. There are three forms:
242 {name}: {type} 239 {name}: {type}
243 {name} = {value} 240 {name} = {value}
254 [!] is used as with `:function`. 251 [!] is used as with `:function`.
255 252
256 *:enddef* 253 *:enddef*
257 :enddef End of a function defined with `:def`. 254 :enddef End of a function defined with `:def`.
258 255
256
257 *:disa* *:disassemble*
258 :disa[ssemble] {func} Show the instructions generated for {func}.
259 This is for debugging and testing.
259 260
260 ============================================================================== 261 ==============================================================================
261 262
262 4. Types *vim9-types* 263 4. Types *vim9-types*
263 264