kdb while loop - Kdb+ / qStudio

Home Forums Kdb+ / qStudio kdb while loop

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23784

    Matt Bell
    Guest

    Hi,

    Is it possible to write a while loop in kdb?

    Or what about other loops, does kdb support for loops, do while loops?

    How can I control running a process a certain number of times?

    #58291

    Chris Webb
    Guest

    Yes it is possible to do that. You can look it up at http://code.kx.com/wiki/Reference/while

    I can give you an example:

    cumsum:{[n]
    a:0;
    while [not n = 0;
    a:a+n;
    n:n-1;
    ];
    :a
    }

    I believe it is self explanatry what happens.

    I hope this answers your question.

    Regards,

    Chris

    #96724

    nike air discount
    Guest

    8. ARISTOTE. Sur are generally figurine d’Hermias, 脿
    nike air discount http://www.tace.or.th/airmax90-fr.asp?p=4660

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

You must be logged in to reply to this topic.