random filenames

new topic     » topic index » view thread      » older message » newer message

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?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu