Filesystem-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Filesystem-Commands >

Filesystem-Commands

LFF. - Line-From-File

Previous Top Next


MiniRobotLanguage (MRL)

 

LFF. Command

Line From File

 

 

Intention

 

This command can be used to read any line from a file.  Usage is simple:

 

' This is the Filename

VAR.$$FIL=?path\start.ini

 

' This is the Linen-umber of the Line we want read

VAR.$$LIN=5

 

' The Line will be in the variable $$RES

LFF.$$FIL|$$LIN|$$RES

 

' We print it in the Editor

DPB.The Line is: $$RES

 

 

 

 

Syntax

 

LFF.P1|P2[|P3]

 

 

Parameter Explanation

 

P1 - Filename to count Lines in.

 

P2 - value of the line which shall be read

 

P3 - optional variable to return the line from the file.

    If omitted the Line is been placed on TOS.

 

 

 

 

Example

 

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

' Demo for LFF and GLC.

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

'DBM.2

' This should be a valid name of a Text-File

: §§FIL=start.ini

GLC.§§FIL|$$RET

PRT.File: $$FIL contains: $$RET Lines.

FOR.$$AAA|1|20

' Read Lin Nr. $$AAA from File ?path\$$FIL into $$RET

LFF.§§FIL|$$AAA|$$REB

PRT.[$$AAA]->$$REB

NEX.

MBX.!

END.

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    ATF - Append-to-File

    CFF. - Copy-From-File

    CTF - Copy-To-File

    CTI. - Copy-To-Inifile

    CFI. - Copy-From_IniFile

    COP. - Copy File

    FEL - For-Each-Line

    GLC. - Get-Line-Count

    IEF. / NEF. - If - exist - File

    SHF. - Shell-File-Operation

    WFF. - Wait-For-File