Insert_Text_before_Line

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > TXT. Text-File Engine > Insert/Delete Text >

Insert_Text_before_Line

TXT.itap

Previous Top Next


MiniRobotLanguage (MRL)

 

TXT.itbl

TXT.Insert_Text_before_Line
Insert Text before the specified Line in the actual TXT.-Buffer.

 

 

Intention

 

This Command is used to Insert Bytes or Text into the internal Text-Buffer at any Position.

 

' Insert Text/Bytes at any Place inside the TXT.Buffer

$$OUT=?exeloc\Result.txt

$$TXT=<ABCDEFG>$crlf$<ABCDEFG>$crlf$<ABCDEFG>$crlf$

TXT.Load_Pure_Text|$$TXT

$$HEA=123

$$POS=2

TXT.Insert_Text_before_Line|$$HEA|$$POS

TXT.Save_File|$$OUT

ENR.

 

Result:

 

<ABCDEFG>

123<ABCDEFG>

<ABCDEFG>

 

 

 

Syntax

 

 

TXT.itbl|P1|P2

TXT.Insert_Text_before_Line|P1|P2

 

 

Parameter Explanation

 

P1 - (Input,Text) Variable with Text that will be Inserted at Position P2.

P2 - (Input,Numeric) Variable with Line-Number, before which the Text will be inserted.

 

Example

 

'*****************************************************

' EXAMPLE 1: TXT.gal

'*****************************************************

$$OUT=?exeloc\Result.txt

$$TXT=<ABCDEFG>$crlf$<ABCDEFG>$crlf$<ABCDEFG>$crlf$

TXT.Load_Pure_Text|$$TXT

$$HEA=123

$$POS=2

TXT.Insert_Text_before_Line|$$HEA|$$POS

TXT.Save_File|$$OUT

ENR.

 

 

Remarks

 

-

 

Limitations:

 

-

 

 

See also:

 

•   TXT.Load Textfile

•   TXT.Clear

•   TXT.From_Var

•   TXT.Load_pure_Text

•   TXT.Get_pure_Text

•   FIL.Generate numbered Name

•   FIL.Move numbered File

•   ATF - Append-to-File

•   CFF. - Copy-From-File

•   CTF - Copy-To-File

•   COP. - Copy File

•   TXT.Get_Filename

•   TXT.Get_Lenght

•   TXT.To_Var_and_Clear

•     GLC. - Get-Line-Count

•     TXT.Get_Line

•     IEF. / NEF. - If - exist - File

•     LFF - Line-From-File

•     WFF. - Wait-For-File

•     REN. - Rename File/Dir