[x3d-public] FreeWRL: I'm not sure what the standard says, but consider enabling ECMAScript's "let" in FreeWRL

John Carlson yottzumm at gmail.com
Thu Sep 14 15:56:31 PDT 2023


Christoph.

1) These aren't global variables, they are local to a function.

2) let doesn't declare a global variable.

3) global variables are frowned and warned about in X3D.

4) let is much better for scoping than var.

John

On Thu, Sep 14, 2023 at 5:29 PM Christoph Valentin <
christoph.valentin at gmx.at> wrote:

> Just fyi......
>
> When I tried to write browser stiff ecmascript for X3D Script nodes, I
> decided to use only var and to use it for local variables.
>
> I avoided to have global ecmascript variables and used "field"s of the
> Script nodes instead.
>
> I do not remember WHY i did this decision.
>
> Kr,
> CP/V
>
> --
> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail
> gesendet.
> Am 14.09.23, 23:01 schrieb John Carlson <yottzumm at gmail.com>:
>
>> Doug,
>>
>> Let me know if there's some configuration to enable ECMAScript's "let"
>> way of declaring variables in FreeWRL.  Otherwise, I have to use var.
>>
>> Thanks!
>>
>> John
>> _______________________________________________ x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230914/4f254090/attachment.html>


More information about the x3d-public mailing list