User Tools

Site Tools


uphp:functions:floatval

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:floatval [2017/04/11 15:20]
jeff
uphp:functions:floatval [2021/09/13 05:57] (current)
Line 3: Line 3:
 <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-Return the <html><b><span style="color:green">float<span style="color:black"></b></html> value of a <html><b><span style="color:green">number<span style="color:black"></b></html> or <html><b><span style="color:green">string<span style="color:black"></b></html>+<html>Return the <b><span style="color:green">float<span style="color:black"></b> value of a <b><span style="color:green">number<span style="color:black"></b> or <b><span style="color:green">string<span style="color:black"></b></html>
  
 ====Description==== ====Description====
  
-<well size="sm"> +<well size="sm"><html>
-<html>+
 <span style="font-size:125%;color:green">mixed <span style="font-size:125%;color:green">mixed
-<span style="color:black"> +<span style="color:black">floatval (<span style="color:green">mixed
-</html> +
-[[floatval]] ( +
-<html><span style="color:green">mixed+
 <span style="color:blue">$value <span style="color:blue">$value
 <span style="color:black">) <span style="color:black">)
-</html> +</html></well>
-</well>+
  
 Return the floating point equivalent Return the floating point equivalent
Line 23: Line 18:
 ====Parameter==== ====Parameter====
  
-<html><b><span style="color:blue">$value<span style="color:black"></b></html>:  A <html><b><span style="color:green">string<span style="color:black"></b></html> with a leading number, or a <html><b><span style="color:green">number<span style="color:black"></b></html> (<html><b><span style="color:green">int<span style="color:black"></b></html> or <html><b><span style="color:green">float<span style="color:black"></b></html>)+<html><b><span style="color:blue">$value<span style="color:black"></b>:  A <b><span style="color:green">string<span style="color:black"></b> with a leading number, or a <b><span style="color:green">number<span style="color:black"></b> (<b><span style="color:green">int<span style="color:black"></b> or <b><span style="color:green">float<span style="color:black"></b>)</html>
  
 ====Return Values==== ====Return Values====
  
   * <html><b><span style="color:green">Float<span style="color:black"></b></html> (if an equivalent exists)   * <html><b><span style="color:green">Float<span style="color:black"></b></html> (if an equivalent exists)
-  * <html><b><span style="color:green">Int<span style="color:black"></b></html> 0 on failure (for example, a <html><b><span style="color:green">string<span style="color:black"></b></html> without a numeric in the leftmost characters) +  * <html><b><span style="color:green">Int<span style="color:black"></b> 0 on failure (for example, a <b><span style="color:green">string<span style="color:black"></b> without a numeric in the leftmost characters)</html> 
-  * <html><b><span style="color:green">Int<span style="color:black"></b></html> 0 on empty <html><b><span style="color:green">array<span style="color:black"></b></html> +  * <html><b><span style="color:green">Int<span style="color:black"></b> 0 on empty <b><span style="color:green">array<span style="color:black"></b></html> 
-  * <html><b><span style="color:green">Int<span style="color:black"></b></html> 1 on non-empty <html><b><span style="color:green">array<span style="color:black"></b></html>+  * <html><b><span style="color:green">Int<span style="color:black"></b> 1 on non-empty <b><span style="color:green">array<span style="color:black"></b></html>
  
 ====Example==== ====Example====
  
-**Convert the integer '1' into a float variable which has a value of 1.000000:**+===Convert the integer '1' into a float variable which has a value of 1.000000===
  
 <code php> <code php>
Line 51: Line 46:
 ====See Also==== ====See Also====
  
-[[intval()]] - Return the <html><b><span style="color:green">integer<span style="color:black"></b></html> value of a <html><b><span style="color:green">number<span style="color:black"></b></html> or <html><b><span style="color:green">string<span style="color:black"></b></html>+[[intval()]] - <html>Return the <b><span style="color:green">integer<span style="color:black"></b> value of a <b><span style="color:green">number<span style="color:black"></b> or <b><span style="color:green">string<span style="color:black"></b></html>
  
-[[strval()]] - Return the <html><b><span style="color:green">string<span style="color:black"></b></html> equivalent of a <html><b><span style="color:green">number<span style="color:black"></b></html>+[[strval()]] - <html>Return the <b><span style="color:green">string<span style="color:black"></b> equivalent of a <b><span style="color:green">number<span style="color:black"></b></html>
  
-[[is_numeric()]] - Check if a value is numeric (<html><b><span style="color:green">int<span style="color:black"></b></html>, <html><b><span style="color:green">float<span style="color:black"></b></html> or numeric <html><b><span style="color:green">string<span style="color:black"></b></html>)+[[is_numeric()]] - <html>Check if a value is numeric (<b><span style="color:green">int<span style="color:black"></b>, <b><span style="color:green">float<span style="color:black"></b> or numeric <b><span style="color:green">string<span style="color:black"></b>)</html>
  
 [[inttoieee754()]] - <html>Convert an IEEE-754 encoded <b><span style="color:green">integer<span style="color:black"></b> representation (32 bit) to a <b><span style="color:green">float<span style="color:black"></b></html> [[inttoieee754()]] - <html>Convert an IEEE-754 encoded <b><span style="color:green">integer<span style="color:black"></b> representation (32 bit) to a <b><span style="color:green">float<span style="color:black"></b></html>
uphp/functions/floatval.1491924036.txt.gz · Last modified: 2021/09/13 05:56 (external edit)