xquery/XQuery__IntegerToDecimalCast.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 12 May 2015 12:20:53 +0100
changeset 296 ea3dbc023c80
parent 241 xquery/trunk/XQuery__IntegerToDecimalCast.st@e28ef0f20186
permissions -rw-r--r--
Post-convert fixes Removed intermediate `trunk` directories used for branching in SVN

"{ Package: 'stx:goodies/xmlsuite/xquery' }"

"{ NameSpace: XQuery }"

AnyAtomicTypeToAnyAtomicTypeCast subclass:#IntegerToDecimalCast
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'XQuery-TypeCasting'
!


!IntegerToDecimalCast methodsFor:'casting'!

cast
    | value |
    value := atomicValue value asDouble.
    ^ AtomicItem withValue: value asType: anotherType typeName.

    "Created: / 17-11-2009 / 16:46:08 / Jan Kurs <kursj1@fel.cvut.cz>"
    "Modified: / 17-11-2009 / 22:36:12 / Jan Kurs <kursj1@fel.cvut.cz>"
! !

!IntegerToDecimalCast class methodsFor:'documentation'!

version_SVN
    ^ '$Id$'
! !