String-Commands * TXT-Command

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > TXT. Text-File Engine > Get Lines and Text >

String-Commands * TXT-Command

TXT.Get_Line_Count

Previous Top Next


MiniRobotLanguage (MRL)

 

TXT.glc

TXT.Get_Line_Count

Return the number of lines of the currently loaded File inside the TXT.-internal Buffer

 

NTFS-Direct

 

Intention

 

This command is used to return the number of lines of the Textfile, that was loaded into the internal Buffer of the TXT.-Commands.

 

' Load Textfile into intrnal Buffer for further TXT.-Command Operations

' ($$RES is 0/1 success)

TXT.Load_Textfile|$$FIL|$$RES

TXT.glc|$$RES

MBX. The loaded File has $$RES Lines.

 

 

 

Syntax

 

 

TXT.glc|P1

TXT.Get_Line_Count|P1

 

 

Parameter Explanation

 

P1 - (Output) Variable with the result of the operation.
 On error a "" is returned also the Timeout-Flag is set.
 On success, the Lenght in Bytes/Charcters of the currently loaded file is been returned.

 If omitted the result is placed on TOS.

 

 

Example

 

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

' EXAMPLE 1: TXT.ltf  and TXT.gtl etc.

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

VAR.$$LAA=?path\..\Pics\Test.txt

TXT.ltf|$$LAA|$$RES

TXT.clr

TXT.glc|$$LAB

JIV.$$LAB!0|Lab_failed

TXT.gtl|$$LAC

JIV.$$LAC!0|Lab_failed

ENR.

 

 

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

  TXT.Load_pure_Text

  TXT.Get_pure_Text

  FIL.Generate numbered Name

  FIL.Move numbered File

  ATF - Append-to-File

  CFF. - Copy-From-File

  CTF - Copy-To-File

  TXT.Get_Line_Count

  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