4m4d3u5
7 years agoContributor
Trunc function
I am trying to use Trunc
it says:
Trunc(FloatValue), so I say Trunc(variable) and it says Trunc is not defined, how do i use this Trunc function?
I am jusing java script but Math.trunc(variable) works
I am trying to use Trunc
it says:
Trunc(FloatValue), so I say Trunc(variable) and it says Trunc is not defined, how do i use this Trunc function?
I am jusing java script but Math.trunc(variable) works
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.
I am jusing java script but Math.trunc(variable) works
Yup, that will do it. You need to specify the Math object if you're using JavaScript.