<< Click to Display Table of Contents >> Navigation: 3. Script Language > TXT. Text-File Engine > Get Lines and Text > String-Commands * TXT-Command |
MiniRobotLanguage (MRL)
TXT.gel
TXT.Get_Line
Get Line with the specified Number from TXT.-internal Buffer into Variable.
Intention
This command is used to get a specified Line from the Text that is in the Internal TXT-Buffer into a Variable.
Variable P2 will contain the Line Nr. P1.
This Command can be used to work on a "Line by line" base through a file without accessing the file on the harddrive.
' Get Line Number $$NUM into $$LIN
$$NUM=10
TXT.gel|$$NUM|$$LIN
MBX.Line 10 is: $crlf$ $$LIN
Syntax
TXT.gel|P1[|P2]
TXT.Get_Line|P1[|P2]
Parameter Explanation
P1 - (Input,numeric) Variable with Line-Number.
P2 - (Output) Variable will contain the Line. If omitted, the line is placed on TOS.
Example
'*****************************************************
' EXAMPLE 1: TXT.gel
'*****************************************************
VAR.$$LAA=?path\..\Pics\Test.txt
CFF.$$LAA|$$RES
TXT.lpt|$$RES|$$LAA
' Now we get only Line 5
TXT.gel|5|$$LIN
MBX.Line 5 is: $$LIN
ENR.
Remarks
-
Limitations:
-
See also:
• IEF. / NEF. - If - exist - File