[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Are variables immutable?
- From: Duke Normandin <dukeofpurl@...>
- Date: Wed, 25 May 2022 10:02:51 -0600
On Wed, 25 May 2022 16:48:08 +0200
Lars Müller <appgurulars@gmx.de> wrote:
> It doesn't say "Lua variables are immutable", /it says that
> strings are immutable like in Python/, which is the case - there
> is no way to change the value of a string, you can only create
> new strings.
>
> On 25.05.22 16:45, Duke Normandin wrote:
> > Lua noob here! Reading Lua primer at learnxinyminures.com to
> > start off with.
> > It says that Lua variables are immutable like in Python.
> > However, in the Lua REPL, I can change any value I set. Maybe I
> > should be reading a more recent tutorial? TIA ...
My mistake! However I set myName = 'blah' which is a string!
Correct? I can then say myName = 'blah-blau' and no error message
shows up.
I'm missing something!
--
Duke
** Text only please. Bottom post works best for me **