DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
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?
    >
    >



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links