[Gambas-user] Conversion of array value to integer
T Lee Davidson
t.lee.davidson at ...626...
Sat Nov 29 06:24:25 CET 2014
On 11/29/2014 12:08 AM, Ian wrote:
> If you have an array value that is a number - TmpAry[0] = "1"
>
> If you try to convert it to an integer with CInt you get an error "Not a
> Function"
> CInt(TmpAry[0])
>
> You get the same error with Val(TmpAry[0])
>
> You DON’T get the same error for CFloat(TmpAry[0]) ?
>
> I assume this is a bug ?
>
> Thanks,
> Ian.
Hi Ian,
Need more info - like a small program that reproduces the error.
I get no error with:
Public Sub Main()
Dim TmpAry As New String[1]
Dim iBucket As Integer
Dim fBucket As Float
TmpAry[0] = "1"
iBucket = CInt(TmpAry[0])
iBucket = Val(TmpAry[0])
fBucket = CFloat(TmpAry[0])
Print "done"
End
--
Lee
__________
"Artificial Intelligence is no match for natural stupidity."
More information about the User
mailing list