String-Commands * TXT-Command

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > TXT. Text-File Engine > To LOF / To Var >

String-Commands * TXT-Command

TXT.To_Var_and_Clear

Previous Top Next


MiniRobotLanguage (MRL)

 

TXT.toc

TXT.To_Var_and_Clear

Move the TXT.-internal Buffer into a Variable using an
internal Format, that includes additional Informations, like the Filenname

 

NTFS-Direct

 

Intention

 

This command is used to make a complete Backup of the currently loaded Text into a Variable.

After doing so, it will call the TXT.Clear-Command to clear the internal Buffer.
However the Text can be restored using the TXT.From_Var-Command.

 

 

' Load Textfile into internal Buffer for further TXT.-Command Operations

' ($$RES is 0/1 success)

TXT.Load_Textfile|$$FIL|$$RES

' Reserve speichern

TXT.toc|$$LAD

' We have now a Backup of the Textfile in $$LAD.

' It can be restored - overwriting the current Buffer-Content using:

TXT.fov|$$LAD

 

 

Syntax

 

 

TXT.toc|P1

TXT.To_Var_and_Clear|P1

 

 

Parameter Explanation

 

P1 - (Output) Variable with the result of the operation.
 On error a "" is returned also the Timeout-Flag is set.
 On success, the Lenght in Bytes/Charcters of the currently loaded file is been returned.

 If omitted the result is placed on TOS.

 

 

Example

 

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

' EXAMPLE 1: TXT.ltf  and TXT.toc etc.

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

VAR.$$LAA=?path\..\Pics\Test.txt

TXT.ltf|$$LAA|$$RES

' Reserve speichern

TXT.toc|$$LAD

' We have now a Backup of the Textfile in $$LAD.

' It can be restored - overwriting the current Buffer-Content using:

TXT.fov|$$LAD

ENR.

 

 

Remarks

 

Can acess very large pathes up to 32767 characters due to the use of NTFS-direct.

 

Limitations:

 

-

 

 

See also:

 

  TXT.Load Textfile

  TXT.Clear

  OPT. - Optional Settings

  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

    IEF. / NEF. - If - exist - File

    LFF - Line-From-File

    WFF. - Wait-For-File

    REN. - Rename File/Dir