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

Previous Top Next


MiniRobotLanguage (MRL)

 

TXT.tov

TXT.To_Var

Copy the TXT.-internal Buffer into a Variable
in a 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.
Therefore 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.tov|$$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.tov|P1

TXT.To_Var|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.gtl etc.

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

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

TXT.ltf|$$LAA|$$RES

' Reserve speichern

TXT.tov|$$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

    MKD. - Make-Directory

    GLC. - Get-Line-Count

    IEF. / NEF. - If - exist - File

    LFF - Line-From-File

    WFF. - Wait-For-File

    REN. - Rename File/Dir