Code: Select all
Procedure PathAddBackslash(*Path$)
If Right(*Path$,1)<>"\"
*Path$+"\"
EndIf
EndProcedure
Code: Select all
Procedure PathAddBackslash(*Path$)
If Right(*Path$,1)<>"\"
*Path$+"\"
EndIf
EndProcedure
Even having said that it surely is faster...Parameters
lpszPath [in, out]
Type: LPTSTR
A pointer to a buffer with a string that represents a path. The size of this buffer must be set to MAX_PATH to ensure that it is large enough to hold the returned string.
Code: Select all
OpenConsole()
#count = 5000000
time.q = ElapsedMilliseconds()
For i = 0 To #count
p1$="c:"
If Right(p1$,1)<>"\" : p1$+"\" : EndIf
Next
t1.q = ElapsedMilliseconds() - time
time.q = ElapsedMilliseconds()
For i = 0 To #count
p2$="c:"
PathAddBackslash_(p2$)
Next
t2.q = ElapsedMilliseconds() - time
PrintN("t1 = " + Str(t1))
PrintN("t2 = " + Str(t2))
PrintN("")
Print("- ENTER -")
Input()