UDT


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: UDT

  1. #1
    zyrou Guest

    UDT

    hello! how to make null User Defined Type variable?
    for example:

    dim udtMyVariable as LINETRANSLATEOUTPUT

    ' *** some code where I use this vairable ***
    ' *** *** *** *** *** ***

    udtMyVariable = 0 ' can I make this?



  2. #2
    Arthur Wood Guest

    Re: UDT


    Zyrou,

    I must plead ignorance, but what is the structure of LINETRANSLATEOUTPUT?
    If this is a simple value, then this is not a UserDefinedType. On the other
    hand, if this is a true Type (with its own structure) then you cannot simply
    set it to 0, you would have to set each of the components to their respective
    values:

    udtMyVariable.FirstField = 0
    udtMyVariable.SecindField = ""

    and so on.

    Or is it the case the LINETRANSLATEOUTPUT is a mapping of some bits within
    an Integer value, and you are trying to clear all of the bits at once?

    In that case, you might be able to use LSet to map the memory used for udtMyVariable:

    dim intClear as Integer
    intClear = 0
    LSet udtMyVariable = intClear


    Arthur Wood

    "zyrou" <arnasm@900.lt> wrote:
    >hello! how to make null User Defined Type variable?
    >for example:
    >
    >dim udtMyVariable as LINETRANSLATEOUTPUT
    >
    >' *** some code where I use this vairable ***
    >' *** *** *** *** *** ***
    >
    >udtMyVariable = 0 ' can I make this?
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center