<< Click to Display Table of Contents >> Navigation: 3. Script Language > TXT. Text-File Engine > Insert/Delete Text > String-Commands * TXT-Command |
MiniRobotLanguage (MRL)
TXT.slt
TXT.Set_Line_to
Replace a Line with the specified Number from the TXT.-internal Buffer with a new Line.
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.
' Change Line Number $$NUM into $$NEW
$$NUM=10
VAR.$$NEW=Hallo
TXT.gel|$$NUM|$$LIN
MBX.Line 10 is: $crlf$ $$LIN
TXT.slt|$$NUM|$$NEW
TXT.gel|$$NUM|$$LIN
MBX.Line 10 is: $crlf$ $$LIN
Syntax
TXT.slt|P1|P2
TXT.Set_Line|P1|P2
TXT.Set_Line_to|P1|P2
Parameter Explanation
P1 - (Input,numeric) Variable with Line-Number.
P2 - (Input) Variable with the new Line that is going to replace the current line.
Example
'*****************************************************
' EXAMPLE 1: TXT.gel
'*****************************************************
' Change Line Number $$NUM into $$NEW
$$NUM=10
VAR.$$NEW=Hallo
TXT.gel|$$NUM|$$LIN
MBX.Line 10 is: $crlf$ $$LIN
TXT.slt|$$NUM|$$NEW
TXT.gel|$$NUM|$$LIN
MBX.Line 10 is: $crlf$ $$LIN
ENR.
Remarks
-
Limitations:
-
See also:
• IEF. / NEF. - If - exist - File