From 2f92bda12bd24cddbd3574d90afac9bc1afd0004 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 5 Aug 2021 15:04:20 +0200 Subject: [PATCH] :art: Update enum docs --- docs/Reference/Types/Enums.mdr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/Reference/Types/Enums.mdr b/docs/Reference/Types/Enums.mdr index 35802b58..25cb3cdf 100644 --- a/docs/Reference/Types/Enums.mdr +++ b/docs/Reference/Types/Enums.mdr @@ -7,17 +7,17 @@ you can read about those ## Enums in gwion -You use an enum like this +enums require a name and at least one member. + +You use them like this: ```gwion,editable -enum Optionnal_name { +enum MyEnum { zero, one, two }; -<<< zero, one, two >>>; +<<< "${MyEnum.zero} ${MyEnum.one} ${MyEnum.two} >>>; ``` ## Storage and access Specifiers -When inside a class, -Enums are automatically declared **static**, and can't be **global** -but they accept **private** or **protect** specifiers. +When inside a class, enums accept **private** or **protect** specifiers. -- 2.43.0