[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] Roman numerals



In message <ba31666c56.pnyoung@xxxxxxxxxxxxxxxxxxxx>
          Peter Young <pnyoung@xxxxxxxxxxxx> wrote:

>On 15 Aug 2017  David Pitt <pittdj@xxxxxxxxxxxx> wrote:
>
>> Gavin Wraith, on 15 Aug, wrote:
>
>>> In message <mpro.ouqmja002a56b0244.pittdj@xxxxxxxxxxxx>
>>>           David Pitt <pittdj@xxxxxxxxxxxx> wrote:
>>> 
>>>> sumnums has more than one issue. adding 'require' as in :-
>>>>
>>>> in require "lpeg"
>>
>This doesn't work. Where did you get that in a StrongED download?

See above remark.

The point is that in previous versions of RiscLua the interpreter
had to have all its libraries, like 'riscos', 'lpeg' etc, already
built in (statically linked is the geek terminology) so it was
OK just to say ' <blah> in lpeg'. But with version 6.xx the libraries
are not built in, but are dynamically linked, which means that the
'require' function has to be used to load them. So where before
' <blah> in lpeg ' was used it now has to be
' <blah> in require "lpeg" '. Note that 'require' is only needed
once, per library, but it doesn't matter if you use it twice,
because the system knows what has already been loaded, and it
will not bother to load it again. Of course it is conceivable
that a program might want to load a library twice (say if during
the time it was running the library gets altered and it wants
to load in the altered copy - a really horrible scenario), in
which case there is a way to make it do that, but you would
be better off reading about that in chapter 17 of Roberto
Ierusalimschy's "Programming in Lua" (edition 4).
The change in RiscLua brings it more into line with the way
Lua works on Linux, Windows, MacOS, etc.

-- 
Gavin Wraith (gavin@xxxxxxxxxxxxxxx)
Home page: http://www.wra1th.plus.com/

--=20
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives at http://www.Torrens.org/RO/StrongED/index.html