====== Floor ====== Round down to the nearest whole number. Dim A As Single, B As Single B = 3.5 A = Floor B ' Floor 3.5 gives 3. Debug Float A ' Print 3.0 If copying the result to one of the Ladder Logic registers, please use a temporary ''Integer'' variable first. Dim S As Single Dim I as Integer S = 3.5 I = Floor S ' Temporarily store the result in `Integer` variable `I` _D(0) = I ' Finally copy the value from `I` to the Ladder Logic register [[cubloc:index#system_library:|Go CUBLOC home]]