User Tools

Site Tools


uphp:functions:indexed_array

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:indexed_array [2017/03/31 13:43]
jeff
uphp:functions:indexed_array [2021/09/13 05:57] (current)
Line 3: Line 3:
 <badge>WMPRO, WMMINI FW >= 1.898</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO, WMMINI FW >= 1.898</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-Create an array of a specific type and size+Create an <html><b><span style="color:green">array<span style="color:black"></b></html> of a specific type and size
  
 ====Description==== ====Description====
  
-<well size="sm"><html><span style="font-size:125%;color:green">array +<well size="sm"><html> 
-<span style="color:black"></html>[[indexed_array]] +<span style="font-size:125%;color:green">array 
-<html>(+<span style="color:black">indexed_array (
 <span style="color:green">int <span style="color:green">int
 <span style="color:blue">$type<span style="color:black">, <span style="color:blue">$type<span style="color:black">,
Line 17: Line 17:
 </html></well> </html></well>
  
-Create an indexed array with the specified type and number of elements. An indexed array is a more efficient way to store variables in memory if the size and data type is known beforehand. The [[array()]] function creates a hashed array, which consumes much more memory per element.+Create an indexed <html><b><span style="color:green">array<span style="color:black"></b></html> with the specified type and number of elements. An indexed array is a more efficient way to store variables in memory if the size and data type is known beforehand. The [[array()]] function creates a hashed array, which consumes much more memory per element.
  
 ====Parameters==== ====Parameters====
  
-<html><span style="color:blue"><b>$type</b><span style="color:black"></html>:  1=byte, 2=short, 3=int, 4=float+<html><b><span style="color:blue">$type<span style="color:black"></b></html>:  1=byte, 2=short, 3=int, 4=float
   * Type 1: Array of bytes   * Type 1: Array of bytes
   * Type 2: Array of short integers (16 bits)   * Type 2: Array of short integers (16 bits)
Line 27: Line 27:
   * Type 4: Array of floating point numbers   * Type 4: Array of floating point numbers
  
-<html><span style="color:blue"><b>$size</b><span style="color:black"></html>:  The number of elements in the array+<html><b><span style="color:blue">$size<span style="color:black"></b>:  The number of elements in the <b><span style="color:green">array<span style="color:black"></b></html>
  
-====Return Value====+====Return Values====
  
-Indexed array+Indexed <html><b><span style="color:green">array<span style="color:black"></b></html>
  
 ====Example==== ====Example====
Line 47: Line 47:
 ====See Also==== ====See Also====
  
-[[array()]] - Create an array, with optional values+[[array()]] - Create an <html><b><span style="color:green">array<span style="color:black"></b></html>, with optional values
  
 [[uphp:variables|uPHP Variable Types and Limits]] [[uphp:variables|uPHP Variable Types and Limits]]
  
uphp/functions/indexed_array.1490967828.txt.gz · Last modified: 2021/09/13 05:56 (external edit)