Difference between revisions of "Vogon.new"

From GiderosMobile
(Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' 2042.11<br/> '''<translate>Class</translate>:''' Vogon<br/> === <translate>...")
 
m (Text replacement - "<source" to "<syntaxhighlight")
 
(6 intermediate revisions by one other user not shown)
Line 6: Line 6:
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate>Create a new Vogon</translate><br/>
 
<translate>Create a new Vogon</translate><br/>
<source lang="lua">Vogon.new()</source>
+
<syntaxhighlight lang="lua">local vogon = Vogon.new()</source>
 +
 
 +
=== <translate>Examples</translate> ===
 +
 
 +
'''Create an administration department of Vogons'''<br/>
 +
<syntaxhighlight lang="lua">local admin_vogons = {}
 +
for i = 1, 42 do
 +
  admin_vogons[#admin_vogons + 1] = Vogon.new()
 +
end
 +
</source>
 +
 
 +
'''Create a string quarter of Vogons'''<br/>
 +
<syntaxhighlight lang="lua">local musical_vogons = {}
 +
for i = 1, 4 do
 +
  musical_vogons[#musical_vogons + 1] = Vogon.new()
 +
end
 +
</source>
  
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
 
''<translate>none</translate>''<br/>
 
''<translate>none</translate>''<br/>
 +
=== <translate>Return values</translate> ===
 +
'''vogon: ''' ''(Vogon)''  <translate>new Vogon object</translate><br/>

Latest revision as of 14:32, 13 July 2023


Available since: 2042.11
Class: Vogon

Description

Create a new Vogon
<syntaxhighlight lang="lua">local vogon = Vogon.new()</source>

Examples

Create an administration department of Vogons
<syntaxhighlight lang="lua">local admin_vogons = {} for i = 1, 42 do

 admin_vogons[#admin_vogons + 1] = Vogon.new()

end </source>

Create a string quarter of Vogons
<syntaxhighlight lang="lua">local musical_vogons = {} for i = 1, 4 do

 musical_vogons[#musical_vogons + 1] = Vogon.new()

end </source>

Parameters

none

Return values

vogon: (Vogon) new Vogon object