When I call my test function in PBDLL5 that converts a string to a currency value, VB6 displays the number differently.
The sample PBDLL code quite correctly displays "Amt@ = 7484.5".
In VB, however, fnCVC produces the value "3435973.8368".
Is there an obvious reason why I don't get the correct number passed back?
PowerBasic Code:
FUNCTION fnCVC EXPORT AS CURRENCY
LOCAL Value$, Amt@
Amt@ = 7484.5
Value$ = MKCUR$(Amt@)
MSGBOX "Amt@ = " + format$(CVCUR(Value$))
FUNCTION = CVCUR(Value$)
END FUNCTION
The sample PBDLL code quite correctly displays "Amt@ = 7484.5".
In VB, however, fnCVC produces the value "3435973.8368".
Is there an obvious reason why I don't get the correct number passed back?
PowerBasic Code:
FUNCTION fnCVC EXPORT AS CURRENCY
LOCAL Value$, Amt@
Amt@ = 7484.5
Value$ = MKCUR$(Amt@)
MSGBOX "Amt@ = " + format$(CVCUR(Value$))
FUNCTION = CVCUR(Value$)
END FUNCTION
Comment