Returns the line number which is being processed.
1 string.lineReader.getLineNumber
<string.lineReader.getLineNumber>
<line /> !
</string.lineReader.getLineNumber>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Eline | lineReader |
Returns | |
---|---|
Type | Description |
integer | Returns the line which is being processed in this moment. |
Example
Text with the numbered lines.
Copy
<xsql-script name='string_lineReader_getLineNumber_sample1'> <body> <set name='m_str'> Copyright 1997, 2018 DEISTER, S.A. Sant Pere Claver 15 baixos, 08017 BARCELONA All rights reserved. This software is confidential and contains information property of DEISTER, S.A. You can not publish this information and only can use it under the terms of the license of use that you signed with DEISTER. </set> <set name='m_in'><string.lineReader><m_str /></string.lineReader></set> <while> <expr> <isnotnull> <set name='m_line'> <string.lineReader.readLine><m_in/></string.lineReader.readLine> </set> </isnotnull> </expr> <do> <set name='m_num'> <string.lineReader.getLineNumber><m_in/></string.lineReader.getLineNumber> </set> <println><m_num />: <m_line/></println> </do> </while> </body> </xsql-script>
Returns:
Copy
1: 2: Copyright 1997, 2018 DEISTER, S.A. 3: Sant Pere Claver 15 baixos, 08017 BARCELONA 4: All rights reserved. 5: 6: This software is confidential and contains information property 7: dof DEISTER, S.A. You can not publish this information and only 8: can use it under the terms of the license of use that you signed 9: with DEISTER. 10: