String-Commands * TXT-Command

<< Click to Display Table of Contents >>

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

String-Commands * TXT-Command

TXT.Set_Line_to

Previous Top Next


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:

 

  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

  TXT.Set_Line_to