S.V
S.V

Reputation: 2793

Setting random number generator seed to a "random" number

Could you, please, let me know how I could set the random number generator seed in KDB to a more or less "random" number?

I am trying to do the following:

\S .z.i

But somehow it does not work. \S seems to expect an explicit integer, not a variable.

Thank you very much!

Upvotes: 3

Views: 831

Answers (1)

Igor Korkhov
Igor Korkhov

Reputation: 8558

Just like with any \x command, when you need to pass a non-literal as an argument you should use system:

system"S ",string .z.i / no backslash before S!

Upvotes: 4

Related Questions