Jump to content

I love this for it's use in the matrix batch file, but how is it actually useful? can i set limits on the number selected?

Just a guy who peaked at building back in the days of the GTX 980. If you see me here, assume i have technical knowledge akin to a committed hobbyist builder back then. If something's changed, you'll need to tell me(nicely plz). I'm probably asking for help with the modern build scene since I have no clue what's going on.

Link to comment
https://linustechtips.com/topic/450206-random/
Share on other sites

Link to post
Share on other sites

I love this for it's use in the matrix batch file, but how is it actually useful? can i set limits on the number selected?

set /a num=%random% %100

 

sets range to [0..99], add a + 1 to move the range up by 1 place (set /a num=%random% %100+1 makes the range [1..100] or set /a num=%random% %100+100 makes the range [100..199] etc etc)

 

It is as useful as you are imaginative. as with all scripting/programming.

Link to comment
https://linustechtips.com/topic/450206-random/#findComment-6036952
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×