GetRowNum Method (DATATABLE)


10.5, PLBCMP GUI Only

 

The GetRowNum method retrieves the data for a specified item in a DATATABLE object and stores the data into a numeric variable. This method uses the following format:

 

[label]

{object}.GetRowNum

[GIVING {return}]:

 

 

USING [*Row=]{row}[:

 

 

[*Col=]{column}][:

 

 

[*Format=]{format}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A DATATABLE object.

return

Optional. A Numeric Variable thay receives the item's text.

row

Required. A Numeric Variable that specifies the zero-based row accessed.

column

Optional. A Numeric Variable that specifies the zero-based column accessed.

format

Optional. A decimal number or Numeric Variable that specifies the format the data being stored in the {return} numeric variable

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The {column} specifies that the text is to come from a child column item of a {row}. If not given, zero is assumed and the text from the left most column item is returned.

  2. Upon completion, {return} will contain the numeric value as specified for the column item's text.

  3. The OVER, ZERO, and EOS Condition Flags are determined the same as described for a MOVE instruction of a Character String to a Numeric variable.

  4. The {format} value is not used when the {return} variable is a FORM. The {format} value is used when the {return} variable is an INTEGER. The {format} values are described as follows:

  5.  

    Value

    Description

    0

     If the text data contains the leading '0x' characters, the text data value is scanned as a hexadecimal string. Otherwise, the text data valued is scanned as a decimal string. If the {format} is not used for the method, this is the default behavior.

    1

    The text data value is always scanned as a hexadecimal string where the text data must have the leading '0x'. Otherwise, the return value is zero.

     

  6. If the {return} variable is a FORM variable and the text data contains the leading '0x' characters, the text data value is scanned as a hexadecimal string and converted to a decimal value. The converted decimal value is returned in the FORM variable.

 

 

See Also: SetRowNum, DATATABLE Methods

 



PL/B Language Reference GetRowCount Method (DATATABLE) GetRowText Method (DATATABLE)