Defines a matrix of rows by columns, in which each element represents a byte.
1 byte.matrix
<byte.matrix
nrows='nrows'
cols='cols'
/>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Anrows | integer | Quantity of rows of the matrix. | |||
Acols | integer | Quantity of columns. |
Returns | |
---|---|
Type | Description |
Object[] | The matrix object. |
Remarks
Generates an array of array of the byte type [row][col], used for printings.
Example
Generates a matrix of 4 lines by 80 columns which represent some lines of printing.
Copy
<xsql-script name='byte_matrix'> <body> <set name='m_page'> <byte.matrix rows='4' cols='80' /> </set> <print.at buf='m_page' row='0' col='10'>The ACME company</print.at> <print.at buf='m_page' row='1' col='40'>San Francisco</print.at> <print.at buf='m_page' row='2' col='0' >California</print.at> <print.at buf='m_page' row='3' col='30' >(02810) California EU.</print.at> <println> <m_page /> </println> </body> </xsql-script>
The result is:
Copy
The ACME company San Francisco California (02810) California EU.
Notas
Through the print command you can fill cells in an array from a row and column.