NAME

defint, defsng, defdbl, defstr - default variable types

SYNOPSIS

defint Letter[-Letter][, Letter[-Letter]]... 
defsng Letter[-Letter][, Letter[-Letter]]... 
defdbl Letter[-Letter][, Letter[-Letter]]... 
defstr Letter[-Letter][, Letter[-Letter]]... 

DESCRIPTION

The defint, defsng, defdbl, and defstr statements declare that variables whose names begin with the letter or letters specified will, in the absence of the explicit type indicators %, !, #, and $, default to type integer, single-precision, double-precision, or string, respectively.  An explicit type declaration character %, !, #, or $ always takes precedence over default typing. 

Letter is any letter of the alphabet (A-Z, a-z).  Upper and lower case are distinguished.  Type declaration statements should be at the beginning of a program and must occur before referencing any variables which they declare. 

In the absence of both an explicit type declaration character and a default type declaration statement, Basmark QuickBASIC assumes that a variable is single-precision. 

EXAMPLE

The program
	10 defdbl t-z
	20 defstr m
	30 defsng R-U
	40 defint k, p-s
	   tally = 1# / 3 : print tally
	   metal = "gold" : print metal
	   k = 10 / 3 : print k
produces
	 .3333333333333333
	gold
	 3
Line 10 declares that all variables beginning with the letters t, u, v, w, x, y or z will be double-precision variables by default.  Line 20 causes all variables beginning with the letter m to be string variables by default.  Line 30 declares that all upper case variables in the range R through U inclusive will be single-precision.  Line 40 declares that all variables beginning with the letters k, p, q, r or s will be integer variables by default. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber