dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: creating primitive type

  1. #1
    Join Date
    Oct 2009
    Posts
    28

    creating primitive type

    hi all, is there anyway that we can create our own primitive type?

    let's say we call this
    Code:
    dim test = 4
    then test will automatically be an integer right..

    but i wanted this
    Code:
    dim test = 4%
    and i want test not to be an integer, but a percentage_integer, in other words, my own primitive type. is that possible?

  2. #2
    Join Date
    Aug 2008
    Posts
    18

    Re: creating primitive type

    No, u cant create primitive data types..
    they are supported by compilers only ..
    but u can create your own type in vb

  3. #3
    Join Date
    Oct 2009
    Posts
    28

    Re: creating primitive type

    ok thanks for the tip

    but the format of a primitive type is neater than creating a new structure. is there a way that we can change how the compiler works such that it can accept my primitive type?
    Last edited by pacerier; October 31st, 2009 at 10:54 AM.

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: creating primitive type

    nope
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Oct 2009
    Posts
    28

    Re: creating primitive type

    orh ic

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)