curly brackets mean what in kdb+q? - Kdb+ / qStudio

Home Forums Kdb+ / qStudio curly brackets mean what in kdb+q?

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #434

    DJ
    Guest

    I have inherited some kdb+ code and can’t understand it.
    What do the curly brackets mean in kdb/q?

    #443

    John Dempster
    Keymaster

    Curly brackets contain a function. e.g.
    {x+1}
    would be a function that adds one to it’s argument.

    {[a] b:a*10; b}
    In this function we have named the argument a
    Created a variable b which is ten times a
    and returned that vlue (Since it’s the last statement)

    {} is only used to contain function bodies there is no other use in kdb.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘curly brackets mean what in kdb+q?’ is closed to new replies.