<< Click to Display Table of Contents >> Navigation: 3. Script Language > FEX. - Enumerations > Enumerations Commands (FEX) |
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.
• IEF. / NEF. - If - exist - File
• IEF. / NEF. - If - exist - File