PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Matrix existence
  • Managing errors
  • Size of
  • Extracting an element value from
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Reads the value of all the elements found in a matrix column.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
// Read the elements found in column 5
ResReadColumn = MatReadColumn("MyMatrix", 5)
Syntax
<Result> = MatReadColumn(<Matrix Name> , <Column to Read> [, <Total Element Size> [, <Number of Decimals> [, <Element Format>]]])
<Result>: Character string
Value of all the elements found in the specified column, in the following format:
<Value of Element 1> + TAB + <Value of Element 2> + TAB + ...
+ TAB + <Value of Element N>
<Matrix Name>: Character string (with quotes)
Name of matrix to read, defined by MatCreate.
<Column to Read>: Integer
Number of the column to read.
<Total Element Size>: Optional integer
Total size of an element to read. This size includes the sign, the thousand separator, the decimal point, the exponent, the integer parts and the decimal parts of the element value.
  • If the element has more than <Total Element Size> digits, <Total Element Size> is increased.
  • If the element has less than <Total Element Size> digits, <Result> is filled with spaces.
  • If <Total Element Size> is not specified, the value of the element read will have the size of its significant part.
  • <Total Element Size> must not exceed 100.
  • If <Total Element Size> is set to 0, the value of the element will have the size of its significant part.
<Number of Decimals>: Optional integer
Number of decimals to read. This parameter always starts with a dot ("."). The last decimal will be rounded. This parameter only affects the float notations ("f") and the exponential notations ("e" and "E"). <Total Element Size> is ignored if <Number of Decimals> is greater than <Total Element Size>.
<Number of Decimals>"d" type (integer)"e" or "E" type (exponential notation) and "f" type (float notation)
.0-0
.N-N (if N is greater than the number of decimals, the decimal part will be filled with zeros)
(not specified)-6
<Element Format>: Optional character
Format for representing an element:
  • d: the value of the element is expressed as a signed integer. The digits found after the decimal point are truncated and <Number of Decimals> is ignored.
  • e or E: the value of the element is expressed as an exponential notation with 1 digit before the decimal point, <Number of Decimals> digits after the decimal point and at least 2 digits in the exponent.
Remarks

Matrix existence

The matrix existence is not checked. To check the matrix existence, use MatExist.

Managing errors

Caution: MatReadColumn returns no error code. To find out whether errors have been generated when reading the column elements, use MatError. To find out the error details, use ErrorInfo associated with the errMessage constant.

Size of <Result>

Caution: The size of the character string returned in <Result> cannot exceed 260 characters. If the matrix column contains more characters, the string found in <Result> will only contain the first 260 characters.

Extracting an element value from <Result>

To extract one or more element values from <Result>, use ExtractString.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230mat.dll
Windows Mobile wp230mat.dll
Java wd230java.jar
Linux wd230mat.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment