<div dir="ltr">forget It's not the same query ... again I'm too fast in my reading ... fufufu<div><br></div><div>Nevertheless I continue to think that Def will be useful </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 13 oct. 2021 à  10:32, Fabien Bodard <<a href="mailto:gambas.fr@gmail.com">gambas.fr@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Found it !!! BugTraker Request #775 :-D</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 13 oct. 2021 à  10:11, Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" target="_blank">gambas.fr@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Enfin !!!<div><br></div><div>mdr 4 month you say 😂... well hum... If I remember well I've querying that during my first attempt on the gb.form.terminal.</div><div><br></div><div>So ... Thank you a lot !!!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 13 oct. 2021 à  00:32, Brian G <<a href="mailto:brian@westwoodsvcs.com" target="_blank">brian@westwoodsvcs.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This is amazing! Thank you so much!<br>
<br>
"Failure is the key to success; <br>
 each mistake teaches us something" .. Morihei Ueshiba<br>
Brian G<br>
<br>
----- On Oct 12, 2021, at 6:00 AM, Benoît Minisini <a href="mailto:g4mba5@gmail.com" target="_blank">g4mba5@gmail.com</a> wrote:<br>
<br>
> Hi,<br>
> <br>
> I have implemented in the compiler the ability to use "constant<br>
> expressions".<br>
> <br>
> Constant expressions are integer expressions that are evaluated at<br>
> compile time, and that can be used in the following places:<br>
> <br>
> - Constant declarations.<br>
> <br>
> - Enumeration declarations.<br>
> <br>
> - Embedded array declarations.<br>
> <br>
> These expressions only support a subset of Gambas operators and<br>
> pre-defined constants.<br>
> <br>
> Here is the list of what you can use inside a constant expression:<br>
> <br>
> - Arithmetic operators: +, -, *, /, \, Div, %, Mod<br>
> <br>
> - Logical operators: And, Or, Xor, Not<br>
> <br>
> - Bitwise operators: Shl, Shr, Asl, Asr, Lsl, Lsr<br>
> <br>
> - Size of a native numerical or date datatype: SizeOf()<br>
> <br>
> - Native datatype constants : gb.Boolean, gb.Byte, gb.Short, gb.Integer,<br>
>Â Â gb.Long, gb.Single, gb.Float, gb.Date.<br>
> <br>
> - Another integer constant.<br>
> <br>
> WARNING! In the context of constant integer expressions, The / operator<br>
> acts like the integer division operator \.<br>
> <br>
> Note that the bitwise operators now can used like... operators, and must<br>
> be used that way in the context of constant integer expressions<br>
> <br>
> Here are some examples:<br>
> <br>
>Â Â Public Const Alpha As Integer = 1<br>
>Â Â Public Const Beta As Integer = (Alpha * 2) + 1<br>
>Â Â Public Const Delta As Byte = Beta + Alpha<br>
> <br>
>Â Â Private Enum FirstFlag = 1 Shl 0, SecondFlag = 1 Shl 1,<br>
>Â Â Â ThirdFlag = 1 Shl 2<br>
> <br>
>Â Â Private SomeEmbeddedArray[Delta * SizeOf(gb.Short)] As String<br>
> <br>
> The corresponding documentation is available in the wiki here:<br>
> <br>
> <a href="https://gambaswiki.org/edit/lang/constexpr" rel="noreferrer" target="_blank">https://gambaswiki.org/edit/lang/constexpr</a><br>
> <br>
> Enjoy it!<br>
> <br>
> --<br>
> Benoît Minisini<br>
> <br>
> ----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
<br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr">Fabien Bodard</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr">Fabien Bodard</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Fabien Bodard</div>