>Hi everybody,
>
>I see that we're using sys(3) in one place which may return non-unique numbers. Does sys(2015) have the same problem?
>
>Say, I see this comment in Help
>
>Remarks
>Use SYS(2015) to create unique names for items such as procedures, functions, files, tables or cursors. You can add a prefix or change the length of the name using the SUBSTR( ) function. For example, the code "tmp"+SUBSTR(SYS(2015),4,3) returns tmpCIOS.
>
>The name that SYS(2015) returns is created from the system date and system time. Calling SYS(2015) more than once during the same millisecond interval
returns a unique character string.
>
>So, can I 100% trust sys(2015)?
>
>Thanks in advance.
Tried the following code:
lbPass = .T.
lcLast = ""
FOR lnTry = 1 TO 100000
lcNow = SUBSTR(SYS(2015),3,10)
IF m.lcLast==m.lcNow THEN
? "Fail at "+TRANSFORM(m.lnTry)+" try."
lbPass = .F.
ENDIF
lcLast = m.lcNow
ENDFOR
IF m.lbPass THEN
? "Passed"
END
it displayed "Passed"