Re: Dim, var, & why?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Tony Proctor" <tony_proctor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:OscxucCtHHA.4916@xxxxxxxxxxxxxxxxxxxxxxx
That's not what I meant Ralph. Arrays are not objects in VB. They can hold
objects but they have no properties or methods themselves.

Going back to VB.Net, I was interested in whether a whole array could be
stored in a simple datum of type Object since this would pretty much make
Variant and Object compatible from a usage POV.

I'm not interested in Collections at this point. I think you misunderstood
my interest here :-)

Tony Proctor


It is likely I misunderstand everything. <g>

Calling a VB Array an "Object" is obviously incorrect in the context of VB.
In VB they are a Data Type. They are also a Type in dotNet (well, a
composite), and all types in dotNet derive from object. Which was what I was
thinking as I typed. <pun not intended> However, what an array really IS
depends on the symatics or even the contents.

[While I usually think I know what I mean, I often mis-speak when dealing
with "Objects/objects" in dotNet. It was bad enough before when the word
"object" was universally abused, but now we have an Object data type and a
base object type from which all 'intrinsic' data types derive unless they
are value-based in which case they aren't objects unless they are asked to
be, which depends on .... Add to that, I change back and forth on a daily
basis - anyone's sanity is bound to become suspect. <g>]

Anyway, forget that mess. <g> Yes, an array reference can be assigned to an
Object Data Type.

I only wandered off into Collections because they offer an alternative
anytime you have a bag of stuff. Arrays definitely have mechanical
advantages, but in a world of O/object thingies sometimes it is just better
to deal with stuff. <g>

-ralph
<g>


.



Relevant Pages

  • Re: how does your language... make a map?
    ... Again, storing the map ... push(array,element) just appends the element to the array. ... Int is the standard integer type, which leaves MapCell (a data type) ... data MapCell(Terrain terrain, Occupant occupant); ...
    (rec.games.roguelike.development)
  • Re: Doc/View question
    ... elements in the array to get how many bytes of stack space it requires. ... sequence of bytes that is long enough to hold the entire contents of the array. ... data type" for this purpose! ... So then it appears that I can put structs of different member types into CArray ...
    (microsoft.public.vc.mfc)
  • Re: VB error
    ... I thought VB only works with Variants, regardless on which Data Type ... used the array syntax correctly later on inside your For-Next loop. ... your assignment statements should look like this.... ...
    (microsoft.public.excel.programming)
  • Re: IAS WPS Extension DLL With EAP-TLV URI AVP Using Guest Authentication
    ... >> Ok, as near as I can tell, there is no BINARY data type in Microsoft's ... >> should be three USHORTs instead of one UCHAR and two USHORTs. ... >> a raatMinimum entry to denote the end of the array. ...
    (microsoft.public.internet.radius)
  • Re: Saving results of query into variables with multiple types
    ... Best to ask dotnet question in the VB dotnet group: ... As to your question you should already have the data as an array of an anonymous type which does in fact have the four distinct members, WinningTime, RaceLength, Dec and RailMetersOut. ... Dim myWinningTime = (From rrd In myScenario.MeetingInfos _ ...
    (microsoft.public.vb.general.discussion)