Re: String or Numeric Variable?
- From: "Steve Gerrard" <mynamehere@xxxxxxxxxxx>
- Date: Sat, 29 Oct 2005 11:02:02 -0700
"ProfitMaxTrading.com" <nospam@xxxxxxxxxx> wrote in message
news:bDL8f.4196$LR1.2319@xxxxxxxxxxxxx
> What I believe you are referring to is Zero-Extension or Sign-Extension. A
> 1-byte value such as &H7F thus becomes &H007F or &H0000007F, etc.?
>
> Then this begs another question.
>
> 1. Why bother even having a BYTE type, or an INTEGER type?
>
I would use these two types primarily when external factors require it.
Some VB and Windows functions take Integers, not Longs, i.e. the VB graphic
functions.
Byte arrays are frequently used to process chunks of binary data, such as
bitmaps and OLE objects, where byte level access is needed.
IF you have a large array, say 100K or more, then it might make sense to use
shorter integer types. Even then, you can pack a long with several values,
writing some methods to get at the individual values. I have done this with 32
1-bit flags in a long, for instance, when each element of the array needed its
own set of flags.
.
- References:
- String or Numeric Variable?
- From: ProfitMaxTrading.com
- Re: String or Numeric Variable?
- From: ProfitMaxTrading.com
- Re: String or Numeric Variable?
- From: Howard Henry Schlunder
- Re: String or Numeric Variable?
- From: ProfitMaxTrading.com
- String or Numeric Variable?
- Prev by Date: Re: String or Numeric Variable?
- Next by Date: Labels
- Previous by thread: Re: String or Numeric Variable?
- Next by thread: Re: String or Numeric Variable?
- Index(es):
Relevant Pages
|