! *obj/ConvertLengths.pvc Converter for Imperial and Metric
! By Gord Davey
! (c) Copyright 2004-2005 Sage Software Canada Ltd.
! Source Code File: $RCSfile: convertlengths.pvs,v $   Version: $Revision: 1.5 $
!      Last Edited: $Date: 2005/10/14 15:31:18 $   Author: $Author: gordd $
!
!
def class "*viewer/convertlengths" unique

    property Version$ = mid(mid("$Revision: 1.5 $",12), 1, len(mid("$Revision: 1.5 $",12)) - 2)
    precision 10

    function InchesToMilliMeters(Length, decimals)
        enter Length, decimals
        return prc( Length * 25.4, decimals)

    function InchesToMilliMeters(Length)
        enter Length
        return _obj'InchesToMilliMeters(Length, 2)

    function MilliMetersToInches(Length, decimals)
        enter Length, decimals
        return prc( Length / 25.4, decimals)

    function MilliMetersToInches(Length)
        enter Length
        return _obj'MilliMetersToInches(Length, 4)

fnend
