ARS. - Text Document Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Arrays and Data-Structures > ARS. - Array's > !ARS. - Text Document Operations >

ARS. - Text Document Operations

ARS.TextSave

Previous Top Next


MiniRobotLanguage (MRL)

 

ARS.TextSave

Save the container to a text file, overwriting the file's current contents.

 

 

Intention

 

The ARS.TextSave command saves the contents of the container to a text file, overwriting the file's current contents. Each item in the container is written as a separate line in the file.

 

 

Illustration:

 

Container Contents:

┌───────────────┐

│ Item 1        │

├───────────────┤

│ Item 2        │

├───────────────┤

│ Item 3        │

└───────────────┘

 

The container is saved to the file, with each item on a new line.

 

Syntax

 

ARS.TextSave|$$ARR|$$FILE

 

 

Parameter Explanation

 

P1 - $$ARR The handle of the Deque.

P2 - $$FILE The path to the text file where the container will be saved.

 

 

Example

 

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

' ARS.TextSave - Sample Script

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

' Create a new Deque

ARS.New|$$DEQ

' Add items to the Deque

ARS.PushLast|$$DEQ|Item1

ARS.PushLast|$$DEQ|Item2

ARS.PushLast|$$DEQ|Item3

' Save the Deque to a text file

ARS.TextSave|$$DEQ|C:\MyFolder\MyFile.txt

' End the script

ENR.

 

 

Remarks

 

-

 

 

Limitations:

- The file will be overwritten if it already exists.

 

See also:

 

ARS.New

ARS.TextLoad

ARS.TextGet