Go to Post WHY WON'T THESE THREADS DIE!!!!!!! Eeach and every year there are at least two discussions about water games. - Rickertsen2 [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Spotlight this post!  
Unread 13-11-2007, 23:07
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Visual Basic

Quote:
Originally Posted by jee7s View Post
Yes, that's a switch-case statement. However, a fall-through switch case statement is a little different:

I might be wrong about that VB switch statement, but I'm pretty sure it doesn't support the fall-through idea.

de KG2OV
Thanks for the clarification. I should have know that, but I don't remember ever seeing that in practice.

However, after reading your post i decided to try that in C#, and as far as I can tell C# dosn't support that either.

This code:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int i = 10;
            switch (i) {
                case (1):
                    Debug.Print("1");
                case (2):
                    Debug.Print("2");
            }
        }
    }
}
generates these errors:
Error 1 Control cannot fall through from one case label ('case 1:') to another C:\Users\Eric Haskins\Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplicati on1\Program.cs 15 17 ConsoleApplication1
Error 2 Control cannot fall through from one case label ('case 2:') to another C:\Users\Eric Haskins\Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplicati on1\Program.cs 17 17 ConsoleApplication1

Am I being stupid again, or is this a limitation of all .net languages?

EDIT: I found my own answer. http://msdn2.microsoft.com/en-us/lib...28(VS.90).aspx That seems slightly old VBish.
EDIT: More info http://blogs.msdn.com/abhinaba/archi...15/492866.aspx
-Eric
__________________
Eric Haskins KC9JVH

Last edited by EHaskins : 13-11-2007 at 23:18.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic help needed. Cody Carey Programming 1 25-02-2007 15:06
Visual Basic Scouting Problem Jeffel Programming 7 11-02-2005 19:30
Visual Basic dddriveman Programming 12 20-03-2004 13:03
Visual Basic 6 Dashboard LBK Rules Programming 1 22-01-2003 13:06


All times are GMT -5. The time now is 06:29.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi