Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do i define a type?
#1
i need to know how to define a type so i can recall its attributes later on
-p
Reply
#2
a set of standard variables. As an example, we'll make a user defined type (called MYTYPE) consisting of an INTEGER variable, a SINGLE variable, and an 8-byte string:

TYPE MYTYPE
A AS INTEGER
B AS SINGLE
C AS STRING*8
END TYPE

That defines the type. To use it, you have to DIM a variable as that type, e.g.,

DIM MYVAR AS MYTYPE

To get to the variable A, you would refer to MYVAR.A. And then there's MYVAR.B and MYVAR.C as well.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#3
http://qbasicnews.com/qboho/qcktype.shtml

*runs*
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#4
Our proud QBOHO provides all answers Wink
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)