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.From_Var

Previous Top Next


MiniRobotLanguage (MRL)

 

TXT.fov

TXT.From_Var

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

 

NTFS-Direct

 

Intention

 

This Command is used to restore the Internal TXT-Buffer "as if the file would have been loaded".

The content of the Variable must be created with the TXT.To_Var or the To_Var_and_Clear Command.

This Command-Set can be used to quickly switch between several Text-Files without loading them each time new from the harddrive.

 

' 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

 

To transfer pure Text from a Variable into the Buffer, use the Command TXT.Load_Pure_Text.

 

Syntax

 

 

TXT.fov|P1

TXT.from_Var|P1

 

 

Parameter Explanation

 

P1 - (Input) Variable with the Textfile, this one must have been created using the tov or toc-Command.

 

 

Example

 

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

' EXAMPLE 1: TXT.tov  and TXT.fov 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.

 

 

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

' EXAMPLE 2: TXT.tov  and TXT.fov etc.

' Subprogram that removes Columns

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

:Lab_Remove_Cols

$$FIK=?exeloc\Test.txt

$$LIA="Q","M","K","I","H",F"

TXT.toc|$$BAK

TXT.Load_pure_Text|$$PAA|$$FIK

TXT.Delimited_Items_Remove|;|$$LIA

TXT.Get_pure_Text|$$PAA

TXT.fov|$$BAK

TXT.Get_Line_Count|$$NUL

RET.

 

 

 

 

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

•   TXT.From_Var

•   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