Decimal datatype

S

S. Viswanathan

Hi All!

How to declare a variable of decimal type with size?
In VB we declare as

Dim ld_amount as decimal
Dim ld_con_amount as decimal

How to define precision size in VB in declaration time?

In Powerbuilder when declare a variable .
Decimal{4} ld_amount
Decimal{2} ld_con_amount
 
J

Jon Skeet [C# MVP]

(Please don't cross-post so widely in future. This has nothing to do
with Visual Studio as an IDE, for example.)

S. Viswanathan said:
How to declare a variable of decimal type with size?
In VB we declare as

Dim ld_amount as decimal
Dim ld_con_amount as decimal

How to define precision size in VB in declaration time?

In Powerbuilder when declare a variable .
Decimal{4} ld_amount
Decimal{2} ld_con_amount

They're not the same kind of type. Decimal in .NET is a floating point
type - it doesn't *have* a scale/precision in the same way that a SQL
DECIMAL field does, for instance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top