Index: Include/com/decimal.ab
===================================================================
--- Include/com/decimal.ab	(revision 211)
+++ Include/com/decimal.ab	(revision 231)
@@ -3,11 +3,193 @@
 #require <oleauto.ab>
 #require <com/variant.ab>
+#require <com/currency.ab>
 
 Class Decimal
 Public
-	Sub Decimal(ByRef d As Decimal)
+	Sub Decimal()
+	End Sub
+
+	Sub Decimal(d As Decimal)
 		dec = d
 	End Sub
 
+	Sub Decimal(lo As Long, mid As Long, hi As Long, isNegative As Boolean, scale As Byte)
+		If scale > 28 Then
+			Debug
+			Throw New ArgumentOutOfRangeException
+		End If
+		Dim sign As Byte
+		If isNegative Then
+			sign = DECIMAL_NEG
+		Else
+			sign = 0
+		End If
+		dec.signscale = MAKEWORD(sign, scale) 'ToDo:どっちが上位だか検証すること
+		dec.Hi32 = hi
+		dec.Lo64 = MAKEQWORD(mid, lo)
+	End Sub
+
+	Sub Decimal(x As Long)
+		VarDecFromI4(x, dec)
+	End Sub
+
+	Sub Decimal(x As DWord)
+		VarDecFromUI4(x, dec)
+	End Sub
+
+	Sub Decimal(x As Int64)
+		VarDecFromI8(x, dec)
+	End Sub
+
+	Sub Decimal(x As QWord)
+		VarDecFromUI8(x, dec)
+	End Sub
+
+	Sub Decimal(x As Single)
+		VarDecFromR4(x, dec)
+	End Sub
+
+	Sub Decimal(x As Double)
+		VarDecFromR8(x, dec)
+	End Sub
+
+	Const Function Operator() As Variant
+		Return New Variant(This)
+	End Function
+/*
+	Static Function Operator(x As SByte) As Decimal
+		Dim d = New Decimal
+		VarDecFromI1(x, d.dec)
+		Return d
+	End Function
+
+	Static Function Operator(x As Byte) As Decimal
+		Dim d = New Decimal
+		VarDecFromUI1(x, d.dec)
+		Return d
+	End Function
+
+	Static Function Operator(x As Integer) As Decimal
+		Dim d = New Decimal
+		VarDecFromI2(x, d.dec)
+		Return d
+	End Function
+
+	Static Function Operator(x As Word) As Decimal
+		Dim d = New Decimal
+		VarDecFromUI2(x, d.dec)
+		Return d
+	End Function
+
+	Static Function Operator(x As Long) As Decimal
+		Dim d = New Decimal
+		VarDecFromI4(x, d.dec)
+		Return d
+	End Function
+
+	Static Function Operator(x As DWord) As Decimal
+		Dim d = New Decimal
+		VarDecFromUI4(x, d.dec)
+		Return d
+	End Function
+
+	Static Function Operator(x As Int64) As Decimal
+		Dim d = New Decimal
+		VarDecFromI8(x, d.dec)
+		Return d
+	End Function
+
+	Static Function Operator(x As QWord) As Decimal
+		Dim d = New Decimal
+		VarDecFromUI8(x, d.dec)
+		Return d
+	End Function
+
+	Static Function Operator(x As DECIMAL) As Decimal
+		Return New Decimal(X)
+	End Function
+
+	Const Function Operator As() As SByte
+		Dim x As SByte
+		VarI1FromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As Byte
+		Dim x As Byte
+		VarUI1FromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As Integer
+		Dim x As Integer
+		VarI2FromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As Word
+		Dim x As Word
+		VarUI2FromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As Long
+		Dim x As Long
+		VarI4FromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As DWord
+		Dim x As DWord
+		VarUI4FromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As Int64
+		Dim x As Int64
+		VarI8FromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As QWord
+		Dim x As QWord
+		VarUI8FromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As Single
+		Dim x As Single
+		VarR4FromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As Double
+		Dim x As Double
+		VarR8FromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As Currency
+		Dim x As Currency
+		VarCyFromDec(dec, x)
+		Return x
+	End Function
+
+	Const Function Operator As() As DECIMAL
+		Return dec
+	End Function
+
+	Static Function Operator As(x As Single) As Decimal
+		Dim d = New Decimal
+		VarDecFromR4(x, d.dec)
+		Return d
+	End Function
+
+	Static Function Operator As(x As Double) As Decimal
+		Dim d = New Decimal
+		VarDecFromR8(x, d.dec)
+		Return d
+	End Function
+*/
 	Const Function Operator +() As Decimal
 		Return New Decimal(dec)
