September 7, 200421 yr As I'm veterinary and not mathematician or computer engineer I've problems with the type of variable.By FSBUS or FSUIPC FSinterrogate, the variables have different formats who have different names depend of the software.Could someone give me some explanations ... Thank'sfor example:word, long word, dword, byte, bit, small, small int, double, float, bollean, string, I8,I16, I32, I64, 8 bit signed, 1 bit unsigned, short int, long int,float64, coordinate, BCD, long double, stringvalue .... and maybe others ... :-hmmm BOB
September 7, 200421 yr these are the ones I know in VB.Net:bit = 0 or 1byte = 0000 to 1111 ( decimal that is 0 to 15 )small = ( 0 to 256 i think )integer = 4 bytes ( -2,147,483,648 to 2,147,483,647 )double = 8 bytes (-1.79769313486231570E+308 through -4.94065645841246544E-324 for negative values and from 4.94065645841246544E-324 through 1.79769313486231570E+308 for positive values ... shortly said: if you want to store "2", use a small, if you want to store "0.2" you'll have to use a doublefloat = 10^38 (positive or negative)with an accuracy of about seven digits, and as small as 10^-44bollean = True or False (0 or 1)string = 0 characters to approximately two billion characters (so text)
September 7, 200421 yr Many variable types are machine and compiler dependent. For example, I think of a byte as typically being 8 bits, and a 4-bit variable to be a nybble. Variables like WORD and LONGWORD are sometimes typedef-ed in header files and may not even be defined by the compiler. While there are many conventions that are generally adhered to, to be really certain about variable typing, be aware of the hardware and software you are operating within.Discussions about variable types often occupy a complete chapter because of this. Steve, I recommend a trip to the library or a bookstore. C++ Primer Plus by Prata has a good discussion of variables along with a few useful commands to interrogate the system you're actually using to find out the size of a given variable type.Mikewww.mikesflightdeckbooks.com
September 7, 200421 yr >these are the ones I know in VB.Net:Just some corrections/clarifications>bit = 0 or 1There isn't any type called "bit" in VB.Net>byte = 0000 to 1111 ( decimal that is 0 to 15 )Byte is always an 8bit variable holding only integers from 0 to 255>small = ( 0 to 256 i think )Small doesn't exist. Integer holding variables are Short (16-bit), Integer (32-bit), and Long (64-bit). Can be also specified as Int16,Int32,Int64.Variables that VB and the .net framework can handle:Boolean System.Boolean 2 bytes True or False. Byte System.Byte 1 byte 0 through 255 (unsigned). Char System.Char 2 bytes 0 through 65535 (unsigned). Date System.DateTime 8 bytes 0:00:00 on January 1, 0001 through 11:59:59 PM on December 31, 9999. Decimal System.Decimal 16 bytes 0 through +/-79,228,162,514,264,337,593,543,950,335 with no decimal point; 0 through +/-7.9228162514264337593543950335 with 28 places to the right of the decimal; smallest nonzero number is +/-0.0000000000000000000000000001 (+/-1E-28). Double (double-precision floating-point) System.Double 8 bytes -1.79769313486231570E+308 through -4.94065645841246544E-324 for negative values; 4.94065645841246544E-324 through 1.79769313486231570E+308 for positive values. Integer System.Int32 4 bytes -2,147,483,648 through 2,147,483,647. Long (long integer) System.Int64 8 bytes -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807. Object System.Object (class) 4 bytes Any type can be stored in a variable of type Object. Short System.Int16 2 bytes -32,768 through 32,767. Single (single-precision floating-point) System.Single 4 bytes -3.4028235E+38 through -1.401298E-45 for negative values; 1.401298E-45 through 3.4028235E+38 for positive values. String (variable-length) System.String (class) Depends on implementing platform 0 to approximately 2 billion Unicode characters. Also, a convertion chart is:8- to 16-bit numeric parameters: (int, short, unsigned int, unsigned short, BOOL, and WORD) as Integer. 32-bit numeric parameters: (long, unsigned long, and DWORD) as LONG.
Create an account or sign in to comment