random filenames
- Posted by Hayden McKay <hmck1 at dodo.com.au> Mar 19, 2007
- 537 views
Doe's anyone know how to implement a small runtime cross-platform random filename generator? I'm currently just adding the '~' char to the filename ie: filename = '~' & filename I've written a small template but it will return unprintable chars;
function TempFile(sequence mode) sequence s s = repeat(-1, 8) for j = 1 to 8 do -- DOS filename compatablity s[j] = rand(125 + 1) end for s &= ".TMP" return OpenFile(s, mode) end function
Maybee a 'set_rand()' might fix?