Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DEFINT A-Z
#1
Quick Question.
ive seen it used and doent know what it does.

DEFINT A-Z

^---- what does this bit of code do?


i know this might be a realy stupid Question!
but bear with me, LOL im only human in a digital world!
t is better to error on the side of caution
than the side of haste!!!
[Image: title3.jpg]
Reply
#2
It sets the default datatype for all non declared variables. This particular instruction sets the defaul type to integer the A-Z says that variables starting with A through Z should be defaulted to the INTEGER type (-32768 to 32767).

The main reason to use his is to accelerate things a bit. Somewhat of a shortcut.
hen they say it can't be done, THAT's when they call me ;-).

[Image: kaffee.gif]
[Image: mystikshadows.png]

need hosting: http://www.jc-hosting.net
All about ASCII: http://www.ascii-world.com
Reply
#3
i see, that makes sense,
thanx!
t is better to error on the side of caution
than the side of haste!!!
[Image: title3.jpg]
Reply
#4
If your program doesn't start with a DEFINT or other DEFxxx, or you do a partial DEFINT like DEFINT A-J, then all the variables not covered will automatically default to SINGLE.
*****
Reply
#5
Sorry, but I just wanna add a bit more because this really bit me in the ass before I had the internet. If you will think about it this way, I think it will make things really clear for ya. Wink

What is the answer to, say... 2 + 2?

4, right? :lol:

Well, it's only addition, right?

OK, so what is the answer to, say... 2.21765493 + 2.3769153?

Takes you a bit longer to figure that one out, aye? Well, it also takes the computer a while longer... not quite as long though. :lol:

Like they were sayin'... DEFINT makes all of QB's variables that begin with the letters A-Z, default to the INTEGER data type , instead of SINGLE floating point.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)