Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multi-dimensional arrays
Message
De
14/07/2002 16:22:06
 
 
À
14/07/2002 12:00:13
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00678465
Message ID:
00678518
Vues:
23
>Jim,
>
>>>My favourite programming language remains OS/Assembler (mainframe) and it is far more "legible" than any variety of C that I have seen. Mind you, it has been 15+ years since I wrote any Assembler and mainframe code was moving to PL/1 at that time.<
>
>I did both Assember and PL/1 in college back in the '70's. I can't imagine why you'd think that Assember is more legible than any "modern" language. Assember is only one step up from machine language (which is all hex numbers). The commands are things like MOV and JMP and something about shifting registers (I don't remember much from the '70's <g>) ... no "structure" to it, all spaghetti code. Not very elegant, IHMO. Jeez, even Cobol was better! <bg>

Well Gerald says that he did a whole bunch in one line of code. And he did. But no one has any real chance of detecting what it does unless they are versed in C#.
OS/Assembler on the other hand does exactly 1 action per line and the opcodes, though terse, generally can have their functionality discerned by their codes.

As to structure, that is a program design issue and has little to do with a programming language. Heck, even Autocoder had the SBR (store B register) instruction so that one could branch to a function and then return to the next line of code.
From a legibility point of view COBOL wins hands-down. And my view is that C and its variants lose hands-down.

cheers

>
>~~Bonnie
>
>
>>Sorry Bonnie, it wasn't "bait". I am looking at ASP.NET before diving into programming.NET and so don't yet know how to do it in VB.NET.
>>
>>I just feel confident that the VB.NET code would be significantly more legible than the stuff shown for C#.
>>
>>I liken it to regular written languages... though I know neither I feel that I have a chance with (say) Spanish but none with Chinese.
>>
>>My favourite programming language remains OS/Assembler (mainframe) and it is far more "legible" than any variety of C that I have seen. Mind you, it has been 15+ years since I wrote any Assembler and mainframe code was moving to PL/1 at that time.
>>
>>I personally don't see any advantage to code having to be so 'obscure' except possibly to promote elitism [hrumph...well he's not a real programmer because he doesn't do C].
>>
>>
>>
>>
>>>OK, Jim ... I'll take the bait. I'm not familiar with VB.NET's syntax since I also am using C#. How would you do this in VB?
>>>
>>>~~Bonnie
>>>
>>>
>>>>Boy, if I needed convincing that VB is a better option, this code does it!! It looks positively gibberishish.
>>>>
>>>>(not criticizing the code, that no doubt is great)
>>>>
>>>>
>>>>>Yes, because everything is an object in c#.
>>>>>In fact, the following code create an array of 2 arrays
>>>>>
>>>>>
>>>>>object[,] multitype = {{4, 5, 6, 1},{ "Claudio","Michel","Carlos","John"}};
>>>>>for (int i=0;i<2;i++)
>>>>>{
>>>>>	for (int ii=0;ii<4;ii++)
>>>>>	{
>>>>>		System.Console.WriteLine(multitype[i,ii]);
>>>>>		System.Console.WriteLine(multitype[i,ii].GetType() );
>>>>>	}
>>>>>}
>>>>>
>>>>>
>>>>>
>>>>>>Hi, everybody.
>>>>>>
>>>>>>Is it possible to create an multi-dimensional array in C# which contains columns of different type? If so, how?
>>>>>>
>>>>>>For example, in VFP we can do this:
>>>>>>
>>>>>>
>>>>>>local Persons(2,2)
>>>>>>Persons(1,1) = "John Jones"
>>>>>>Persons(1,2) = 24
>>>>>>
>>>>>>Persons(2,1) = "Paul Wink"
>>>>>>Persons(2,2) = 30
>>>>>>
>>>>>>
>>>>>>Is it possible in C#?
>>>>>>
>>>>>>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform