Enumerations Commands (FEX)

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > FEX. - Enumerations >

Enumerations Commands (FEX)

FEL. - For Each Line (in file)

Previous Top Next


MiniRobotLanguage (MRL)

 

FEL. Enumeration Command

For each Line (in a file)

 

 

Intention

 

Enumerate all lines in a file.

 

 

 

Syntax

 

 

FEL.P1|P2|P3[|P4][|P5]

 

 

Parameter Explanation

 

P1 - Label where the for each will jump "for each element"

P2 - Temp. Variable, updated by FEX each round.

P3 - Filename

P4 - (optional) Pattern for the Lines to enumerate. If omitted,

    *.* is used and all lines are enumerated.

P5 - (optional) maximum line-number to enumerate (stop-line)

 

 

 

 

Example

 

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

' FEL-Sample

' Copies all line containing a C-Comment into

' a new Textfile.

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

DBM.2

' Source-File (must exist)

VAR.§§FIL=?pfad\Orig.txt

' Targetfile

VAR.§§TAR=?pfad\Tar.txt

DEL.§§TAR

FEL.doit|§§LIN|§§FIL|{/*&ANDTHEN:*/}

 

:over

MBX.Halt to read output

 

END.

 

:doit

VAR.§§LIN=$crlf$§§LIN

ATF.§§TAR|§§LIN

RET.

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

 

 

 

 

Remarks

 

FEL. is a Member of the FEX-Family "For Each X". They are used for easy enumeration

 

 

Limitations:

 

-

 

 

See also:

 

    3.1 Systemvariables especially: #fex#, #fxd# . etc.

    1.6.1. Program Flow Control

    IEF. / NEF. - If - exist - File

    EFX. - Exit - FEX

    LOF. - Load-Text-File

    LFT. - Line-From-Text

    ATF - Append-to-File

    CFF. - Copy-From-File

    CTF - Copy-To-File

    CTI. - Copy-To-Inifile

    CFI. - Copy-From_IniFile

    COP. - Copy File

    GLC. - Get-Line-Count

    IEF. / NEF. - If - exist - File

    LFF - Line-From-File

    SHF. - Shell-File-Operation

    WFF. - Wait-For-File