<< Click to Display Table of Contents >> Navigation: 3. Script Language > TXT. Text-File Engine > Other Commands > String-Commands * TXT-Command |
MiniRobotLanguage (MRL)
TXT.gtl
TXT.Get_Lenght
Return the lenght in Bytes/Characters of the currently loaded File inside the TXT.-internal Buffer
Intention
This command is used to return the Length in Bytes 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.gtl|$$RES
MBX.File loaded has a lenght of $$RES Bytes.
Syntax
TXT.gtl|P1
TXT.Get_Lenght|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.gtl|$$LAB
JIV.$$LAB!0|Lab_failed
TXT.gfl|$$IND
TXT.gtl|$$LAB
JIV.$$LAB!1040|Lab_failed
TXT.gfn|$$LAB
NVC.$$LAB=Test.txt
GTO.Lab_failed
EIF.
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