Error message for wrong argument type?

General FreeBASIC programming questions.
klystron
Posts: 3
Joined: Nov 04, 2007 3:07

Error message for wrong argument type?

Postby klystron » Nov 26, 2007 5:22

This compiles...

Code: Select all

 sub funk( a() as double )
   ? a(0)
end sub

dim as integer a(9)   
a(0) = 3   
funk( a() ) 
VirusScanner
Posts: 775
Joined: Jul 01, 2005 18:45

Postby VirusScanner » Nov 26, 2007 5:49

For number types, the standard is that if you aren't going to lose any precision (byte to integer, integer to single, single to double, etc), the types can be converted for you. I didn't know it worked for arrays too, though.
cha0s
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois
Contact:

Postby cha0s » Nov 26, 2007 7:15

It was a bug... fixed in SVN.

Return to “General”

Who is online

Users browsing this forum: No registered users and 5 guests