<< 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.gts
TXT.Get_to_Start
Get all Text that is before a specified Line, including the specified line.
Intention
This command is used to get all Text before a specified Line from the Text that is in the Internal TXT-Buffer, into a Variable.
It will include the specified Line itself. Variable P2 will contain the Text before and include the Line Nr. P1.
' Get all Text before Line 10 into $$LEF
$$NUM=10
TXT.gts|$$NUM|$$LEF
LEN.$$LEF|$$LEN
'JIV.$$LEN!238|Lab_failed
Syntax
TXT.gts|P1[|P2]
TXT.Get_to_Start|P1[|P2]
Parameter Explanation
P1 - (Input,numeric) Variable with Line-Number.
P2 - (Output) Variable will contain the Text. If omitted, the line is placed on TOS.
Example
'*****************************************************
' EXAMPLE 1: TXT.gts
'*****************************************************
VAR.$$LAA=?path\..\Pics\Test.txt
TXT.ltf|$$LAA
' Get all Text before Line 10 into $$LEF
$$NUM=10
TXT.gts|$$NUM|$$LEF
LEN.$$LEF|$$LEN
MBX.Len of returned Text is:$$LEN
ENR.
Remarks
-
Limitations:
-
See also:
• IEF. / NEF. - If - exist - File