Difference between revisions of "Vogon.new"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
 
(5 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">local vogon = Vogon.new()</source>
+
<syntaxhighlight lang="lua">local vogon = Vogon.new()</source>
  
=== <translate>Example</translate> ===
+
=== <translate>Examples</translate> ===
  
 
'''Create an administration department of Vogons'''<br/>
 
'''Create an administration department of Vogons'''<br/>
<source lang="lua">local admin_vogons = {}
+
<syntaxhighlight lang="lua">local admin_vogons = {}
 
for i = 1, 42 do
 
for i = 1, 42 do
   admin_vogons[#vogons + 1] = Vogon.new()
+
   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
 
end
 
</source>
 
</source>

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