;[Program&SV2]
DEFFCT REAL ROUND(R:IN, N:IN)
;[Program&E]
;Version:310
;[Point&S]
DECL E6POINT P0={A1 0.000, A2 0.000, A3 0.000, A4 0.000, A5 0.000, A6 0.000, X 0.000, Y 500.000, Z 0.000, A 0.000, B 0.000, C 0.000, E1 0.000, E2 0.000, E3 0.000}
;NULL; Tool=0; Base=0; E1Mode=NULL; E2Mode=NULL; E3Mode=NULL
;[Point&E]
;[Program&SV2]
    REAL R,S
    INT N, L, T
    L = 0
    WHILE L < N+1
        T = R
        R = R*10
        L = L+1
    ENDWHILE
    T = R - T*10
    R = R/10
    IF T > 4 THEN
        T = R
        T = T + 1
    ELSE
        T = R      
    ENDIF
    R = T
    L = 0
    WHILE L < N
        R = R/10
        L = L+1
    ENDWHILE
    S = R
    RETURN S
ENDFCT
;[Program&E]
