IPXS_PDFVariant::Arr_GetInt Method

From PDF XChange PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
m (Automatic page editing by robot)
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:IPXS_PDFVariant::Arr_GetInt Method}}
 
{{#customTitle:IPXS_PDFVariant::Arr_GetInt Method}}
{{#parentPage:PXV:IPXS_PDFVariant|Arr_GetInt Method|method}}
+
{{#parentPage:PXV:IPXS_PDFVariant#Methods|Arr_GetInt|method}}
{{ToReview}}
+
  
Returns the value of specified element of array as integer. If specified element is <code>PVT_Double</code> type it value will be truncated to integer. If specified element is neither <code>PVT_Integer</code> nor <code>PVT_Double</code> type, <code>nDefValue</code> is returned.
+
Returns the value of a specified element of an array as an integer. If the specified element type is <code>PVT_Double</code>, the value will be truncated to an integer. If specified element type is neither <code>PVT_Integer</code> nor <code>PVT_Double</code>, <code>nDefValue</code> is returned.
  
 
== Syntax ==
 
== Syntax ==
 
<pre class="brush:cpp;gutter:false">HRESULT Arr_GetInt([in]                  ULONG  nIndex,
 
<pre class="brush:cpp;gutter:false">HRESULT Arr_GetInt([in]                  ULONG  nIndex,
 
                   [in, defaultvalue(0)]  LONG  nDefValue,
 
                   [in, defaultvalue(0)]  LONG  nDefValue,
                   [out, retval]          LONG*  pVal);</pre>
+
                   [out, retval]          LONG*  nVal);</pre>
  
 
== Parameters ==
 
== Parameters ==
Line 16: Line 15:
 
:[in] Specifies the index of the array element.
 
:[in] Specifies the index of the array element.
 
;nDefValue
 
;nDefValue
:[in, defaultvalue(0)] Default value that will be returned when specified index is out of range or the element is not a numeric value.
+
:[in, defaultvalue(0)] Default value that will be returned when specified index is out of range or the element is not a numeric value. If not specified, zero will be returned.
;pVal
+
;nVal
:[out, retval]  Pointer to LONG variable that receives returned value.
+
:[out, retval]  Pointer to a LONG variable that receives the returned value.
  
 
== Return Value ==
 
== Return Value ==
Line 24: Line 23:
  
 
== See Also ==
 
== See Also ==
[[PXV:IPXS_PDFVariant|IPXS_PDFVariant]].
+
[[PXV:IPXS_PDFVariant|IPXS_PDFVariant]]

Latest revision as of 02:42, 15 June 2015

Returns the value of a specified element of an array as an integer. If the specified element type is PVT_Double, the value will be truncated to an integer. If specified element type is neither PVT_Integer nor PVT_Double, nDefValue is returned.

Syntax

HRESULT Arr_GetInt([in]                   ULONG  nIndex,
                   [in, defaultvalue(0)]  LONG   nDefValue,
                   [out, retval]          LONG*  nVal);

Parameters

nIndex
[in] Specifies the index of the array element.
nDefValue
[in, defaultvalue(0)] Default value that will be returned when specified index is out of range or the element is not a numeric value. If not specified, zero will be returned.
nVal
[out, retval] Pointer to a LONG variable that receives the returned value.

Return Value

Returns S_OK if operation was successful or error code in other cases. Returns S_FALSE when nDefValue returned.

See Also

IPXS_PDFVariant