v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User:Sphr/f"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
Line 89: Line 89:
 
*[[User:Sphr/f/mult_3]]
 
*[[User:Sphr/f/mult_3]]
  
==array2_elem==
+
==1d array==
wip
 
  
<nowiki>{{:Sphr/f/array2_elem|r|c|{data-template}}}</nowiki> where r,c are non-negative numbers and {data-template} is a specially prepared 2d-array data gives the element at row r and col c, assuming that r < array row size and c < array column size. r,c are zero-based at the moment.
+
*[[User:Sphr/f/array1_elem]] | <nowiki>{{{1}}}</nowiki> | ''num-elements'' | ''data ...''
 +
Used to define a 1d array data template
  
*[[User:Sphr/f/array1_size]]
+
*[[User:Sphr/f/array1_size]] | ''1d-array data template''
*[[User:Sphr/f/array1_elem]]
+
Gets the size defined in the 1d-array data template
  
*[[User:Sphr/f/array2_size1]]
+
==2d array==
*[[User:Sphr/f/array2_size2]]
+
 
*[[User:Sphr/f/array2_elem]]
+
*[[User:Sphr/f/array2_elem]] | <nowiki>{{{1}}}</nowiki> | <nowiki>{{{2}}}</nowiki> | ''num-rows'' | ''num-cols'' | ''data ...''
 +
Used to define a 2d array data template
 +
 
 +
*[[User:Sphr/f/array2_size1]] | ''2d-array data template''
 +
Gets number of rows defined in the 2d-array data template
 +
 
 +
*[[User:Sphr/f/array2_size2]] | ''2d-array data template''
 +
Gets number of cols defined in the 2d-array data template
 +
 
 +
*[[User:Sphr/f/array2_index]] | ''row-desired'' | ''col-desired'' | ''num-rows'' | ''num-cols''
 +
Used internally to computes internal index

Revision as of 16:15, 11 January 2008

template function test

If any "function call" results in an undefined wikipage, it means the implementation for that value is still missing.


inc

User:Sphr/f/inc

{{:Sphr/f/inc|x}} where x is a number gives value of x+1 if implemented.

implementation

dec

User:Sphr/f/dec

{{:Sphr/f/dec|x}} where x is a number gives value of x-1 if implemented.

implementation

add

User:Sphr/f/add

{{:Sphr/f/add|x|y}} where x,y are numbers gives value of x+y if implemented.

implementation


User:Sphr/f/minus

{{:Sphr/f/minus|x|y}} where x,y are numbers gives value of y-x if implemented.

implementation

mult

User:Sphr/f/mult

{{:Sphr/f/mult|x|y}} where x,y are numbers gives value of x*y if implemented.

implementation

1d array

Used to define a 1d array data template

Gets the size defined in the 1d-array data template

2d array

Used to define a 2d array data template

Gets number of rows defined in the 2d-array data template

Gets number of cols defined in the 2d-array data template

Used internally to computes internal index