Forum Discussion

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Just want to confirm... the project that you're trying to use this in, is it being developed in DelphiScript?

    You can tell if, in a script unit, you see at the bottom of the screen the indication of the script language.  

     

     

    The reason I ask is because the Trunc function is a DelphiScript only function.  If you're not using DelphiScript, that function is not available to you.

    • 4m4d3u5's avatar
      4m4d3u5
      Contributor

      I am jusing java script but Math.trunc(variable) works

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Yup, that will do it.  You need to specify the Math object if you're using JavaScript.