Results 1 to 4 of 4

Thread: Reading other peoples stuff

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    Omaha, Ne
    Posts
    65

    Question

    In the following section of code:

    dim i%


    What does the "%" do for me?

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    Should be equivalent to "Dim i As Integer".

    Basically just a shortcut for declaring the variable type.

    Dim i
    - i will be a variant
    Dim i%
    - i will be an Integer (2 bytes)
    Dim i&
    - i will be a Long Integer (4 bytes)
    Dim i!
    - i will be Single-precision floating point.

    There are a few more. Any good VB book will list these out.

    [Edited by jbart on 08-21-2000 at 11:22 AM]

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    Omaha, Ne
    Posts
    65

    Cool ahhhhhhh

    Thanks so much. My trusty book isn't with me today and MSDN isn't much help on a search for "%".

  4. #4
    Guest
    Code:
    Integer 	%	2 bytes	-32,768 to 32,767.
    Long
    (long integer)	&	4 bytes	-2,147,483,648 to 2,147,483,647.
    Single
    (single-precision floating-point)	!	4 bytes	-3.402823E38 to -1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for positive values.
    Double
    (double-precision floating-point)	#	8 bytes	-1.79769313486232E308 to 
    -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values.
    Currency
    (scaled integer)	@	8 bytes	-922,337,203,685,477.5808 to 922,337,203,685,477.5807.
    String	$	1 byte per character	0 to approximately 65,500 bytes. (Some storage overhead is required.)
    I got that off of an Old VB3 help file, I couldnt seem to find them in MSDN...

Posting Permissions

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



Click Here to Expand Forum to Full Width