Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defint A-Z

Status
Not open for further replies.

quebasic2

Programmer
Dec 17, 2002
174
0
0
IN
What does DEFINT A-Z stand for, qbasics helb file is very vague.
 
It makes all variables that don't have a dollar sign (i.e. not a string) into integers. Integers have no decimal point, just plain ole numbers. Anything with a decimal is rounded up to the next whole number. It's just an easy way of making QBasic treat all number variables as whole numbers.
 
...
And that generally used to speed things up (because loop counters usually integers and Basic works faster with integers)
But you can define over types of variables with dim (like dim x as double) or use special symbols to denote type (x!, x#, x& and as was mentioned x$).
 
in addition.... where do you put it? do you just toss it in the beginning of your program, and it will apply to all variables after?



King Poncho
 
It can be placed anywhere but is normally placed at the top of SUBs

DEFINT A-Z
SUB subname (parameter)
...
END SUB




If a man says something in the forest and no woman hears it is he still wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top