runtime(doc): update enum helptext

closes: #17112

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yegappan Lakshmanan
2025-04-14 21:14:33 +02:00
committed by Christian Brabandt
parent 836b87d699
commit 4ec93fec12

View File

@ -1,4 +1,4 @@
*vim9class.txt* For Vim version 9.1. Last change: 2025 Apr 05
*vim9class.txt* For Vim version 9.1. Last change: 2025 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1067,6 +1067,22 @@ The above enum definition is equivalent to the following class definition: >
public const ordinal: number
endclass
<
A enum can contain object variables and methods just like a regular
class: >
enum Color
Cyan([0, 255, 255]),
Magenta([255, 0, 255]),
Gray([128, 128, 128])
var rgb_values: list<number>
def Get_RGB(): list<number>
return this.rgb_values
enddef
endenum
echo Color.Magenta.Get_RGB()
<
==============================================================================
9. Rationale