You are not logged in.

OlimilO

Intermediate

  • "OlimilO" is male
  • "OlimilO" started this thread

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

1

Tuesday, September 29th 2009, 6:12pm

currency - assigning a value?

Hello,
in VB there is the Currency-datatype. Internally it is a signed Int64, but with a fixed divisor of 10000. It seems that Jabaco knows the Currency datatype as well, but how can we assign a value to it?
I tried:

Jabaco Source

1
2
Dim c As Currency 
c = 1.5

and also:

Jabaco Source

1
2
Dim c As Currency 
c = CCur(1.5)


OlimilO

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

2

Tuesday, September 29th 2009, 8:09pm

Hi,
by try-and-error I've found out that you actually can assign a "single" variable to a currency.
Internally, currency variables are treated as "double" in Jabaco.
However, if you do assign a single, it gets casted and thus truncated to a "long" internally.

My advice is not to use "currency" for the time being.

Greetings

A1880

Rate this thread
WoltLab Burning Board