Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module talk:Yesno
(section)
Add languages
Page contents not supported in other languages.
Add topic
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
Add topic
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Doc questions (blank string true/false) == # In the documentation, I changed the "nil" example into singular. Or are there are other forms of nil covered and to be documented? (uppercase?, a non-initialised variable?). # The last paragraph is about the <code><nowiki>''</nowiki></code> value (blank string). It says: :''Although the blank string usually evaluates to false in wikitext, it evaluates to true in Lua.'' Is this correct here? :According to this same documentation, it is treated as "not a boolean". It says it returns the default (parameter) value, not the 'true' value. That is: not recognised as a boolean, iic. And elsewhere the doc says "<code><nowiki>yesno('')</nowiki></code> returns nil". (I did not test any). -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 09:06, 8 April 2014 (UTC) ::On nil: there is only one kind of nil. However, there may be many variables in any given module whose value may be nil, hence "nil values". There is no "uppercase nil", and in Lua there is no such thing as a non-initialised variable, as variables are initialised when they are first used. On the blank string: saying that it "evaluates to true" is talking about when it is used in if/then statements or with the <code>and</code> and <code>or</code> operators. For example, the following code will return true: <syntaxhighlight lang="lua"> if '' then return true else return false end </syntaxhighlight> ::Does that clear things up? β '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|βͺ talk βͺ]]</sup> 09:26, 8 April 2014 (UTC) :::Does it clear things up? Don't know. Documentation did not change. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 12:10, 8 April 2014 (UTC) ::::I mean, do you understand it now? β '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|βͺ talk βͺ]]</sup> 12:34, 8 April 2014 (UTC)
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)