QBasic / QB64 Discussion Forum      Other Subforums, Links and Downloads
 

 Return to Index  

DEFs...

January 19 2002 at 10:22 AM
  (no login)


Response to Value range for K, K%, K&, K! AND K#

 

QB's standard type is SINGLE (as mentioned in the above post) but, you can use the following statments:
DEFINT
DEFSNG
DEFDBL
DEFLNG
DEFSTR
Those are, respectively for: INTEGER, SINGLE, DOUBLE, LONG, and STRING. Those are used to "change" the default, but not entirely. You could use sometihng like:
DEFINT A, C-F
DEFLNG G-I

That way, you have any variable that starts with letters A, C, D, E or F been declared as an INTEGER, and anyvariable starting with G or I as LONG, but how 'bout the one's started by other letter? Well, those are SINGLE! Unless changes by a DIM statment (as explained in the above post).

lkt153

 
 Respond to this message   
 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement