KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy create random symbol with length >8

  • create random symbol with length >8

    Posted by lestat-jin on July 7, 2024 at 5:32 pm

    is there any restriction when creating random symbol longer than 8 char? it seems ?`9 returns error but shorter symbol fine (see screenshot)…

    Thanks.

    lestat-jin replied 3 months, 2 weeks ago 2 Members · 2 Replies
  • 2 Replies
  • rocuinneagain

    Member
    July 8, 2024 at 8:24 am

    8 is a documented limit

    https://code.kx.com/q/ref/deal/#generate

    symbols, each of n chars (n≤8)

    To create 3 random symbols of length 20:

    q){`$y cut (x*y)?16#.Q.a}[3;20]

    `hgpfbbonnjlpppnpjago`mebadmhpkcjgoheikpmh`pbkbabaofjhmacenfabc

    • lestat-jin

      Member
      July 8, 2024 at 7:00 pm

      I see, thanks!

Log in to reply.