Difference between revisions of "Main Page"

From Lianjapedia
Jump to: navigation, search
(Naming and Creating a Variable)
Line 7: Line 7:
 
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]
 
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]
 
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
 
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
 
====Naming and Creating a Variable====
 
Variable names must begin with a letter (A-Z, a-z) or an underscore (-), followed by any combination of letters, digits or underscores.  The variable name can be of any length, but only the first 32 characters are significant, so these must be unique.  Recital ignores the case of letters, so m_var, M_VAR, and m_VaR would all be treated as the same memory variable name.
 
 
The name given to a variable has no bearing on the type of data that is, or can be, stored in it.  By default, Recital is a loosely typed language and the type of data stored in a particular variable can be changed at any time.  Variables can be declared as a particular data type, and in this case only values of the correct data type can be assigned.
 
 
<code lang="recital">
 
private nVar as numeric
 
// Valid assignment
 
nVar = 1234
 
// Throws error
 
nVar = 'a character value'
 
</code>
 
 
When [[SET STRICT|set strict is on]], variables must be declared before their value can be assigned. By default, [[SET STRICT|set strict is off]] and pre-declaration is not required.  Variables can be declared as public, private or local and will be initialized as a logical false (.F.).
 
 
<code lang="recital">
 
public cVar1 as character, nVar1
 
private cVar2, nVar2 as numeric
 
local cVar3, nVar3, dVar3 as date
 
</code>
 

Revision as of 10:51, 27 December 2010

MediaWiki has been successfully installed.

Consult the User's Guide for information on using the wiki software.

Getting started