-- ooRexx
say SysTempFileName(Value(TEMP,, "ENVIRONMENT")"FuBar_?????");
say SysTempFileName(Value(TEMP,, "ENVIRONMENT")"FuBar_?????");
say SysTempFileName(Value(TEMP,, "ENVIRONMENT")"FuBar_?????");
D04105641@inbox.lv
2K3 server
Intel Xeon 3.2GHz (2 CPU)
Anonymous
Logged In: YES
user_id=667060
Originator: NO
I can confirm that I also see this behaviour (3.2.0 on WXP).
I'm not sure that this is a bug. The documentation says SysTempFileName
'Returns a unique name for a file or directory that does not currently exist.'
The use of the term unique here might be the cause of the confusion. As the OP does not create a file based on the return from the first call, one could consider it valid that sysTempFileName returned the same file name again, because at the time of the call, a file with the first name does not exist.
hth
Jon
Logged In: YES
user_id=1125291
Originator: NO
Jon has diagnosed this correctly. The SysTempFileName() function only guarantees that it will return a name for a file that does not exist in the target location. Since this program is not creating the actual temp file, it's bypassing the mechanism used to determine the suitability of the returned name.