From: Jérémie Astor Date: Thu, 5 Aug 2021 13:04:20 +0000 (+0200) Subject: :art: Update enum docs X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=2f92bda12bd24cddbd3574d90afac9bc1afd0004;p=gwion.git :art: Update enum docs --- 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.