<< Click to Display Table of Contents >> Navigation: 3. Script Language > TXT. Text-File Engine > Get Lines and Text > String-Commands * TXT-Command |
MiniRobotLanguage (MRL)
TXT.glc
TXT.Get_Line_Count
Return the number of lines of the currently loaded File inside the TXT.-internal Buffer
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:
• IEF. / NEF. - If - exist - File