Script – variable definition

Optuma Forums Optuma Scripting Script – variable definition

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #52063
    Mario
    • Topics: 28
    • Replies: 40
    • Posts: 68

    Hello

     

    I am writing a script and and doing a calculation example:  v2 = a1/b1;

    v2 = 840/270 = 3.111, I would like to only use the whole number further in the next calculation.

    For example 3×170.  Is there a way to define the var v2 so that it only returns 3, and not 3.111?

     

    Thanks 

    Mario

    #52067
    Darren
    • Topics: 67
    • Replies: 705
    • Posts: 772

    Hi Mario,

    Use the ROUND() function: https://help.optuma.com/kb/faq.php?id=1039

    So your example:

    V1 = a1/b1;

    ROUND(V1, DECIMALTYPE=0)

    Capture

     

    #52131
    Mario
    • Topics: 28
    • Replies: 40
    • Posts: 68

    Worked great, thanks Darren

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest