manual correction

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

manual correction

Dolan, Ryanne Thomas (UMR-Student)
In the 5.1 manual's description of package.loaded, it says require will return the value of package.loaded [modulename] if the value "is not false".  I believe this should read "is not false or nil".



Reply | Threaded
Open this post in threaded view
|

Re: manual correction

Aaron Brown
Ryanne Thomas Dolan wrote:

In the 5.1 manual's description of package.loaded, it says
require will return the value of package.loaded
[modulename] if the value "is not false".  I believe this
should read "is not false or nil".

The full quote is:

When you require a module modname and
package.loaded[modname] is not false, require simply
returns the value stored there.

I can see how someone might misread this but, consistently
with the rest of the manual, "false" here is in a regular
typeface, which means it's being used as an adjective (e.g.,
"*nil* is a false value"; the keyword "false" always appears
in a special typeface (e.g., "the boolean value *false*".

Sorry this isn't threaded -- for some reason most messages
don't make it to my Hotmail account and I have to read them
in the archive and reply to them by starting a new thread.

--
Aaron



Reply | Threaded
Open this post in threaded view
|

RE: manual correction

Dolan, Ryanne Thomas (UMR-Student)
ah, I see.  I didn't realize the manual took this convention and was confused when reading that section.  Thanks.

-----Original Message-----
From: [hidden email] on behalf of Aaron Brown
Sent: Sun 3/19/2006 12:42 PM
To: [hidden email]
Subject: Re: manual correction
 
Ryanne Thomas Dolan wrote:

>In the 5.1 manual's description of package.loaded, it says
>require will return the value of package.loaded
>[modulename] if the value "is not false".  I believe this
>should read "is not false or nil".

The full quote is:

>When you require a module modname and
>package.loaded[modname] is not false, require simply
>returns the value stored there.

I can see how someone might misread this but, consistently
with the rest of the manual, "false" here is in a regular
typeface, which means it's being used as an adjective (e.g.,
"*nil* is a false value"; the keyword "false" always appears
in a special typeface (e.g., "the boolean value *false*".

Sorry this isn't threaded -- for some reason most messages
don't make it to my Hotmail account and I have to read them
in the archive and reply to them by starting a new thread.

--
Aaron




<<winmail.dat>>