How do i define a type? - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html) +--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html) +--- Thread: How do i define a type? (/thread-329.html) |
How do i define a type? - Placeborick - 03-03-2003 i need to know how to define a type so i can recall its attributes later on A user defined variable type consists of ... - Glenn - 03-03-2003 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. How do i define a type? - toonski84 - 03-04-2003 http://qbasicnews.com/qboho/qcktype.shtml *runs* How do i define a type? - Neo - 03-04-2003 Our proud QBOHO provides all answers |