|
From: Daniel G. <sp...@ho...> - 2002-07-01 12:09:03
|
I'd be interested too if anyone can give a good definition of C#. I know that you have greater control over memory management than in C++, that's about it. Daniel P.S. We could try http://www.codeproject.com as a source of info seeing as it has a C# section. _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com |
|
From: Ramana K. <ra...@my...> - 2002-07-01 12:49:46
|
ok, cool, so C# is interpreted? (and always will be? - i guess it has to be) that is great news to me. from what i read tonight (on the internet at various places) C# is designed primarily at enterprise level, to drastically increase productivity and convenience at the cost of a loss in C++'s raw power. so, i guess C# is more a replacement of java than of c++? cristian wrote that he is learning c# and that it can do all that c++ does and is as easy as vb (which are all correct for this purpose) and it just so happens that i was in the middle of writing a long program using win32api in c++ which i anticipate to finish in a year or two (one man job!). my fear was that i should be looking at switching to c# in this early stage of development. it seems now, hopefully, that c++ is still the way to go? thanks cristian and others ramana -----Original Message----- From: Teodorescu Cristian [mailto:te...@xt...] Sent: Monday, 1 July 2002 10:16 PM To: Ramana Kumar Subject: Re: [Dev-C++] C# Ramana Kumar wrote: >I'm sure we can all feel it's presence. >And i feel it also oozes Microsoft's presence too. > >anyway... i know this is the dev-c++ mailing list, and i love dev-c++, but >since you are all supposedly c++ programmers like me, could someone please >explain to me what is c#? I've read a lot of stuff about it tonight on the >internet, so i know a bit about it. >are any of you learning it? > Yes i learn C# >who should learn it? > Depends it seems to replace java >what's it really for? > evrithing you want need :-) it can do all c++ do and is easy as vb so ... i >is c++ still going to be as widely used? > yes beacuse c# is a interpreted language by .net machine (as i know)and like java windows app are sloow sa c++ is a fast alternative you can't write time critical app in c# or java so ... >or am i way off track in asking that? >i know there is a free c# compiler somewhere (haven't looked into that yet >though), as well as obviously the micro$oft visual c#... is bloodshed >considering starting a c# editor/compiler? > www.microsoft.com framework sdk has a c# compiler, >does anyone know much about .NET? it seems i might have to get a bit more of >an understanding of .NET because information on c# assumes you know what >.NET is all about. >the whole .NET and c# thing looks great for all the benefits people are >raving about, but the first thing i felt when i saw so many c# books in a >bookstore and not enough c++ ones is a bit of fear that my native language >is being overridden lol - not exactly a legitimate fear, but hey >so anyway, any information on c# would be appreciated >thanks > >ramana > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > best regard Teodorescu Cristian |
|
From: Rob <ro...@us...> - 2002-07-01 13:02:06
|
The way I've heard it characterized by a few people I know is that C# is Microsoft's Java-killer of the week. I'm actually more interested in using Java for Java-esque tasks, if that's the case. It's becoming a fairly mature language, and C# is brand new (and married to Microsoft, presumably). C# is no threat to C++, and even if it was, the skills one picks up while learning C++ are invaluable. Heck, learning C++ is even making me a better Python programmer! Rob Andrews http://uselesspython.com Ramana Kumar wrote: > ok, cool, so C# is interpreted? (and always will be? - i guess it has to be) > that is great news to me. > from what i read tonight (on the internet at various places) C# is designed > primarily at enterprise level, to drastically increase productivity and > convenience at the cost of a loss in C++'s raw power. > so, i guess C# is more a replacement of java than of c++? > cristian wrote that he is learning c# and that it can do all that c++ does > and is as easy as vb (which are all correct for this purpose) and it just so > happens that i was in the middle of writing a long program using win32api in > c++ which i anticipate to finish in a year or two (one man job!). my fear > was that i should be looking at switching to c# in this early stage of > development. it seems now, hopefully, that c++ is still the way to go? > thanks cristian and others > ramana > > -----Original Message----- > From: Teodorescu Cristian [mailto:te...@xt...] > Sent: Monday, 1 July 2002 10:16 PM > To: Ramana Kumar > Subject: Re: [Dev-C++] C# > > > Ramana Kumar wrote: > > >>I'm sure we can all feel it's presence. >>And i feel it also oozes Microsoft's presence too. >> >>anyway... i know this is the dev-c++ mailing list, and i love dev-c++, but >>since you are all supposedly c++ programmers like me, could someone please >>explain to me what is c#? I've read a lot of stuff about it tonight on the >>internet, so i know a bit about it. >>are any of you learning it? >> >> > Yes i learn C# > > >>who should learn it? >> >> > Depends it seems to replace java > > >>what's it really for? >> >> > evrithing you want need :-) > it can do all c++ do and is easy as vb so ... i > > >>is c++ still going to be as widely used? >> >> > yes beacuse c# is a interpreted language by .net machine (as i know)and > like java windows app are sloow sa c++ is a fast alternative > you can't write time critical app in c# or java so ... > > >>or am i way off track in asking that? >>i know there is a free c# compiler somewhere (haven't looked into that yet >>though), as well as obviously the micro$oft visual c#... is bloodshed >>considering starting a c# editor/compiler? >> >> > www.microsoft.com > framework sdk has a c# compiler, > > >>does anyone know much about .NET? it seems i might have to get a bit more >> > of > >>an understanding of .NET because information on c# assumes you know what >>.NET is all about. >>the whole .NET and c# thing looks great for all the benefits people are >>raving about, but the first thing i felt when i saw so many c# books in a >>bookstore and not enough c++ ones is a bit of fear that my native language >>is being overridden lol - not exactly a legitimate fear, but hey >>so anyway, any information on c# would be appreciated >>thanks >> >>ramana >> >> >> >> >>------------------------------------------------------- >>This sf.net email is sponsored by:ThinkGeek >>Welcome to geek heaven. >>http://thinkgeek.com/sf >>_______________________________________________ >>Dev-cpp-users mailing list >>Dev...@li... >>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >> >> >> > > best regard Teodorescu Cristian > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > -- "Giving the Linus Torvalds Award to the Free Software Foundation is a bit like giving the Han Solo Award to the Rebel Alliance." --Richard Stallman at the 1999 LinuxWorld show |
|
From: Ramana K. <ra...@my...> - 2002-07-01 13:42:01
|
thanks rob! it's nice to hear stuff like that :) lol for those who are interested: The C# language is derived from C and C++, and it was created for the enterprise developer who is willing to sacrifice a bit of C++'s raw power for more convenience and productivity. C# is modern, simple, object-oriented, and type-safe. It borrows a lot from C and C++, but it is considerably different in specific areas such as namespaces, classes, methods, and exception handling. C# provides you with convenient features such as garbage collection, type safety, versioning, and more. The only "expense" is that by default your code operates in safe mode, where no pointers are allowed. Type safety pays off. However, if you need pointers, you can still use them via unsafe code--and no marshaling is involved when calling the unsafe code. /.../ You are provided with a runtime environment by NGWS, the NGWS runtime. This runtime manages the execution of code, and it provides services that make programming easier. As long as the compiler that you use supports this runtime, you will benefit from this managed execution environment. Your guess-that the C# compiler supports the NGWS runtime - is correct. However, it is not the only compiler that supports the NGWS runtime; Visual Basic and C++ do so also. The code that these compilers generate for NGWS runtime support is called managed code. The benefits your applications gains from the NGWS runtime are Cross-language integration (through the Common Language Specification) Automatic memory management (garbage collection) Cross-language exception handling (unified unwinding) Enhanced security (including type safety) Versioning support (the end of "DLL hell") Simplified model for component interaction -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Rob Sent: Monday, 1 July 2002 11:05 PM To: dev...@li... Subject: Re: [Dev-C++] C# The way I've heard it characterized by a few people I know is that C# is Microsoft's Java-killer of the week. I'm actually more interested in using Java for Java-esque tasks, if that's the case. It's becoming a fairly mature language, and C# is brand new (and married to Microsoft, presumably). C# is no threat to C++, and even if it was, the skills one picks up while learning C++ are invaluable. Heck, learning C++ is even making me a better Python programmer! Rob Andrews http://uselesspython.com Ramana Kumar wrote: > ok, cool, so C# is interpreted? (and always will be? - i guess it has to be) > that is great news to me. > from what i read tonight (on the internet at various places) C# is designed > primarily at enterprise level, to drastically increase productivity and > convenience at the cost of a loss in C++'s raw power. > so, i guess C# is more a replacement of java than of c++? > cristian wrote that he is learning c# and that it can do all that c++ does > and is as easy as vb (which are all correct for this purpose) and it just so > happens that i was in the middle of writing a long program using win32api in > c++ which i anticipate to finish in a year or two (one man job!). my fear > was that i should be looking at switching to c# in this early stage of > development. it seems now, hopefully, that c++ is still the way to go? > thanks cristian and others > ramana > > -----Original Message----- > From: Teodorescu Cristian [mailto:te...@xt...] > Sent: Monday, 1 July 2002 10:16 PM > To: Ramana Kumar > Subject: Re: [Dev-C++] C# > > > Ramana Kumar wrote: > > >>I'm sure we can all feel it's presence. >>And i feel it also oozes Microsoft's presence too. >> >>anyway... i know this is the dev-c++ mailing list, and i love dev-c++, but >>since you are all supposedly c++ programmers like me, could someone please >>explain to me what is c#? I've read a lot of stuff about it tonight on the >>internet, so i know a bit about it. >>are any of you learning it? >> >> > Yes i learn C# > > >>who should learn it? >> >> > Depends it seems to replace java > > >>what's it really for? >> >> > evrithing you want need :-) > it can do all c++ do and is easy as vb so ... i > > >>is c++ still going to be as widely used? >> >> > yes beacuse c# is a interpreted language by .net machine (as i know)and > like java windows app are sloow sa c++ is a fast alternative > you can't write time critical app in c# or java so ... > > >>or am i way off track in asking that? >>i know there is a free c# compiler somewhere (haven't looked into that yet >>though), as well as obviously the micro$oft visual c#... is bloodshed >>considering starting a c# editor/compiler? >> >> > www.microsoft.com > framework sdk has a c# compiler, > > >>does anyone know much about .NET? it seems i might have to get a bit more >> > of > >>an understanding of .NET because information on c# assumes you know what >>.NET is all about. >>the whole .NET and c# thing looks great for all the benefits people are >>raving about, but the first thing i felt when i saw so many c# books in a >>bookstore and not enough c++ ones is a bit of fear that my native language >>is being overridden lol - not exactly a legitimate fear, but hey >>so anyway, any information on c# would be appreciated >>thanks >> >>ramana >> >> >> >> >>------------------------------------------------------- >>This sf.net email is sponsored by:ThinkGeek >>Welcome to geek heaven. >>http://thinkgeek.com/sf >>_______________________________________________ >>Dev-cpp-users mailing list >>Dev...@li... >>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >> >> >> > > best regard Teodorescu Cristian > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > -- "Giving the Linus Torvalds Award to the Free Software Foundation is a bit like giving the Han Solo Award to the Rebel Alliance." --Richard Stallman at the 1999 LinuxWorld show ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Ioannis V. <no...@ho...> - 2002-07-01 16:46:15
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Ramana Kumar > Sent: Monday, July 01, 2002 4:40 PM > To: Rob; C++ > Subject: RE: [Dev-C++] C# > > > thanks rob! it's nice to hear stuff like that :) lol > for those who are interested: > > The C# language is derived from C and C++, and it was created for the > enterprise developer who is willing to sacrifice a bit of > C++'s raw power > for more convenience and productivity. C# is modern, simple, It has nothing to do with it at all (although it may be advertised as a panacea). > object-oriented, and type-safe. It borrows a lot from C and > C++, but it is > considerably different in specific areas such as namespaces, classes, > methods, and exception handling. > > C# provides you with convenient features such as garbage > collection, type > safety, versioning, and more. Basically it provides all the .NET facilities, which are available for the other languages too. Also it doesn't provide something more. > The only "expense" is that by > default your > code operates in safe mode, where no pointers are allowed. > Type safety pays > off. However, if you need pointers, you can still use them via unsafe > code--and no marshaling is involved when calling the unsafe code. > /.../ > You are provided with a runtime environment by NGWS, the NGWS > runtime. NGWS was the project name of .NET for much time ago! :) 2 years+ ago. NGWS is now called .NET the the NGWS runtime is now called Common Language Runtime (CLR). > This > runtime manages the execution of code, and it provides > services that make > programming easier. As long as the compiler that you use supports this > runtime, you will benefit from this managed execution environment. > > Your guess-that the C# compiler supports the NGWS runtime - > is correct. > However, it is not the only compiler that supports the NGWS > runtime; Visual > Basic and C++ do so also. The code that these compilers > generate for NGWS > runtime support is called managed code. The benefits your > applications gains > from the NGWS runtime are > > Cross-language integration (through the Common Language Specification) > > Automatic memory management (garbage collection) > > Cross-language exception handling (unified unwinding) > > Enhanced security (including type safety) > > Versioning support (the end of "DLL hell") > > Simplified model for component interaction All these are available for all languages too (currently only for the languages supported by VS 7 .NET, that is C++, C#, VB, Jscript(?)). Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ho...> - 2002-07-01 16:41:54
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf Of Rob > Sent: Monday, July 01, 2002 4:05 PM > To: dev...@li... > Subject: Re: [Dev-C++] C# > > > The way I've heard it characterized by a few people I know is > that C# is > Microsoft's Java-killer of the week. I'm actually more interested in > using Java for Java-esque tasks, if that's the case. It's becoming a > fairly mature language, and C# is brand new (and married to > Microsoft, > presumably). Java-killer yes. I do not know if it is of the week. But it was made primarily to make Java programmers to switch to .NET. The programmers of the other languages can continue using the languages they currently use. > C# is no threat to C++, and even if it was, the skills one picks up > while learning C++ are invaluable. Heck, learning C++ is even > making me > a better Python programmer! :) C++'s way has nothing to do with C#s. Also VBs way has nothing to do with C#s! It is simply another language, which as you suggested is intended to lure Java programmers. .NET is an API and doesn't require to use C#. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ho...> - 2002-07-01 16:38:48
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Ramana Kumar > Sent: Monday, July 01, 2002 3:49 PM > To: Teodorescu Cristian; C++ > Subject: RE: [Dev-C++] C# > > > ok, cool, so C# is interpreted? (and always will be? - i It requires the CLR, as Java requires the JVM. > guess it has to be) > that is great news to me. > from what i read tonight (on the internet at various places) > C# is designed > primarily at enterprise level, to drastically increase > productivity and > convenience at the cost of a loss in C++'s raw power. > so, i guess C# is more a replacement of java than of c++? It is Yet Another Proprietarry Language (Java is too although it will probably annoy you :) ). > cristian wrote that he is learning c# and that it can do all > that c++ does It can't. > and is as easy as vb (which are all correct for this purpose) It is simple if it is what you mean (i prefer the term simplistic). > and it just so > happens that i was in the middle of writing a long program > using win32api in > c++ which i anticipate to finish in a year or two (one man > job!). C# uses the .NET API. You can use the .NET API in C++ too. It is the same API for all languages (C#, C++, VB, ...). I have already bought a book to learn .NET (Win32 will not be used anymore). So you can use the same simple system-depedent API for all languages which is a good thing. > my fear > was that i should be looking at switching to c# in this early stage of > development. it seems now, hopefully, that c++ is still the way to go? > thanks cristian and others C++'s way has nothing to do with C#s way. The same applies for VBs way etc. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Flavio de S. <fla...@ya...> - 2002-07-01 23:33:31
|
I'd like to give my little contribution to this discussion. I think M$ again wants to monopolize the market by using some marketing. They called their next revolution 'C#' just to grab as much programers as possible. They want 'C++' programmers to think that the C# has something to do with C itself. They want that people who program in C++, VB, etc; now to program in only one M$ language. As it was mentioned in this discussion most of the world software base was built in C++. Even if we stop right now to program in C++, C++ programmers would be needed to migrate C++ structure to any other programming structure, I believe during more two decades ! I myself prefer java, since it came first. Right now, I am learning C++ preferably and I am trying to use java for some soft non critical programming. Regards, -- Flávio de Souza fla...@ya... ICQ: 78458203 _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
|
From: Rob <ro...@us...> - 2002-07-02 00:08:39
|
C++ is definitely a strong choice for programming students. The two main reasons I've seen professors offer on its behalf are that it's a language that the students will actually find useful "in the real world" and that students who gain a solid foundation in C++ seem to be more capable of handling a wide variety of challenges later in their course of study. Since we've been talking about .NET during this thread as well, I think it's interesting to point out that out of all the components of the new M$ Visual Studio .NET, C++ is the only language you can use within that system to compile programs that will run on computers that do not have .NET installed. This places a serious limitation on C#, VB, and all the other components. (I get the impression they didn't think many C++ developers would buy it with the .NET limitation.) Rob Andrews http://uselesspython.com Flavio de Souza wrote: > I'd like to give my little contribution to this discussion. > > I think M$ again wants to monopolize the market by using some marketing. > > They called their next revolution 'C#' just to grab as much programers > as possible. They want 'C++' programmers to think that the C# has > something to do with C itself. They want that people who program in C++, > VB, etc; now to program in only one M$ language. > > As it was mentioned in this discussion most of the world software base > was built in C++. Even if we stop right now to program in C++, C++ > programmers would be needed to migrate C++ structure to any other > programming structure, I believe during more two decades ! > > I myself prefer java, since it came first. > > Right now, I am learning C++ preferably and I am trying to use java for > some soft non critical programming. > > Regards, > -- "Giving the Linus Torvalds Award to the Free Software Foundation is a bit like giving the Han Solo Award to the Rebel Alliance." --Richard Stallman at the 1999 LinuxWorld show |
|
From: Ioannis V. <no...@ho...> - 2002-07-02 02:19:28
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Rob
> Sent: Tuesday, July 02, 2002 3:11 AM
> To: dev...@li...
> Subject: Re: [Dev-C++] C#
>
>
> C++ is definitely a strong choice for programming students.
> The two main
> reasons I've seen professors offer on its behalf are that it's a
> language that the students will actually find useful "in the
> real world"
> and that students who gain a solid foundation in C++ seem to be more
> capable of handling a wide variety of challenges later in their course
> of study.
>
> Since we've been talking about .NET during this thread as
> well, I think
> it's interesting to point out that out of all the components
> of the new
> M$ Visual Studio .NET, C++ is the only language you can use
> within that
> system to compile programs that will run on computers that do not have
> .NET installed. This places a serious limitation on C#, VB,
> and all the
> other components. (I get the impression they didn't think many C++
> developers would buy it with the .NET limitation.)
According to IDC Developer's report for 2001 C++ is the dominant general
purpose programming language with about 2.6 million developers
worldwide. Second was VB with about (if i recall correctly) 1.4 million
developers, and then were other languages like Java etc. They know that
C++ is the most popular.
After all they claim that Windows are written with their Visual C++.
Mainly they advertise C# much because i think they want to lure Java
developers and if possible why not VB developers. C# can be used by C++
coders for normal applications and probably be learned by them in 1-2
days. I have seen this happening with me learning advanced Pascal in 2
days after learning C (The {$i+}, {$i-} etc stuff). But i hate Pascal.
:)
After learning single and multiple inheritance in C++ how difficult it
can be to learn using single inheritance only that is being used by C#?
Another stupid thing i recall from C# is the use of goto inside a switch
statement.
It was something like:
switch(x)
{
case 1:
x=2;
goto 3;
case 3:
y=4;
case 5:
z=6;
default: // something
}
As i said something *like* that.
So if you want to do the same job for some range of values you have to
use gotos!
e.g. in C++ you would do:
switch(x)
{
case 1:
case 2:
case 3:
cout<<"Get lost loser!\n";
break;
// ...
}
in C# you have to do sonething like:
switch(x)
{
case 1: goto case 3;
case 2: goto case 3;
case 3: something_java_like.writeconsole_something("Get lost
loser!\n");
// ...
}
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Teodorescu C. <te...@xt...> - 2002-07-02 07:30:58
|
Ioannis Vranos wrote:
>>-----Original Message-----
>>From: dev...@li...
>>[mailto:dev...@li...] On Behalf Of Rob
>>Sent: Tuesday, July 02, 2002 3:11 AM
>>To: dev...@li...
>>Subject: Re: [Dev-C++] C#
>>
>>
>>C++ is definitely a strong choice for programming students.
>>The two main
>>reasons I've seen professors offer on its behalf are that it's a
>>language that the students will actually find useful "in the
>>real world"
>>and that students who gain a solid foundation in C++ seem to be more
>>capable of handling a wide variety of challenges later in their course
>>of study.
>>
>>Since we've been talking about .NET during this thread as
>>well, I think
>>it's interesting to point out that out of all the components
>>of the new
>>M$ Visual Studio .NET, C++ is the only language you can use
>>within that
>>system to compile programs that will run on computers that do not have
>>.NET installed. This places a serious limitation on C#, VB,
>>and all the
>>other components. (I get the impression they didn't think many C++
>>developers would buy it with the .NET limitation.)
>>
>>
>
>According to IDC Developer's report for 2001 C++ is the dominant general
>purpose programming language with about 2.6 million developers
>worldwide. Second was VB with about (if i recall correctly) 1.4 million
>developers, and then were other languages like Java etc. They know that
>C++ is the most popular.
>
>After all they claim that Windows are written with their Visual C++.
>
>
>Mainly they advertise C# much because i think they want to lure Java
>developers and if possible why not VB developers. C# can be used by C++
>coders for normal applications and probably be learned by them in 1-2
>days. I have seen this happening with me learning advanced Pascal in 2
>days after learning C (The {$i+}, {$i-} etc stuff). But i hate Pascal.
>:)
>
>
>After learning single and multiple inheritance in C++ how difficult it
>can be to learn using single inheritance only that is being used by C#?
>Another stupid thing i recall from C# is the use of goto inside a switch
>statement.
>
>
Bad and good
Bad becuse they called goto.
Good beacuse it help you to define a way a good one in a switch
sometimes i have to write smth like
switch (x){
case 1 : code_1 ;break
case 2 : code_2 ;break
case 3 : code3+code 1:break
case 4 : code 4+code 2:break
default : break;
};
so in C# :
switch (x){
case 1 :code_1;
case 2 : code_2;
case 3 : code 3 goto 1;
case 4 : code_4 goto 2;
};
more simple :-)
>
>It was something like:
>
>switch(x)
>{
> case 1:
> x=2;
> goto 3;
> case 3:
> y=4;
>
> case 5:
> z=6;
>
> default: // something
>
>}
>
>
>As i said something *like* that.
>
>
>So if you want to do the same job for some range of values you have to
>use gotos!
>
>e.g. in C++ you would do:
>
>switch(x)
>{
> case 1:
> case 2:
> case 3:
> cout<<"Get lost loser!\n";
> break;
>// ...
>}
>
>
>in C# you have to do sonething like:
>
>switch(x)
>{
> case 1: goto case 3;
> case 2: goto case 3;
> case 3: something_java_like.writeconsole_something("Get lost
>loser!\n");
>// ...
>}
>
>
>Ioannis
>
>* Ioannis Vranos
>* Programming pages: http://www.noicys.cjb.net
>* Alternative URL: http://run.to/noicys
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
|
|
From: Ioannis V. <no...@ho...> - 2002-07-02 10:25:49
|
<http://run.to/noicys> -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Teodorescu Cristian Sent: Tuesday, July 02, 2002 10:32 AM To: dev...@li... Subject: Re: [Dev-C++] C# Bad and good Bad becuse they called goto. Good beacuse it help you to define a way a good one in a switch sometimes i have to write smth like switch (x){ case 1 : code_1 ;break case 2 : code_2 ;break case 3 : code3+code 1:break case 4 : code 4+code 2:break default : break; }; so in C# : switch (x){ case 1 :code_1; case 2 : code_2; case 3 : code 3 goto 1; case 4 : code_4 goto 2; }; more simple :-) Perhaps a bad design issue? My first solution to this is to make small inlining functions for code1 & code2. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys |
|
From: Hongli L. <h....@ch...> - 2002-07-02 00:40:31
|
On Tue, 2002-07-02 at 01:30, Flavio de Souza wrote: > I'd like to give my little contribution to this discussion. > > I think M$ again wants to monopolize the market by using some marketing. > They've been doing this for years. Microsoft doesn't innovate, they just take old technologies, put a marketing campaigne around it, and claim that it's theirs. |
|
From: Teodorescu C. <te...@xt...> - 2002-07-02 07:32:30
|
Hongli Lai wrote:
>On Tue, 2002-07-02 at 01:30, Flavio de Souza wrote:
>
>
>>I'd like to give my little contribution to this discussion.
>>
>>I think M$ again wants to monopolize the market by using some marketing.
>>
>>
>>
>
>They've been doing this for years.
>
>
they said that they do whatever it takes to impose .net as future
platform.
>Microsoft doesn't innovate, they just take old technologies, put a
>marketing campaigne around it, and claim that it's theirs.
>
>
fasle .net is not an old tech.
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
|
|
From: Hongli L. <h....@ch...> - 2002-07-02 09:11:10
|
On Tue, 2002-07-02 at 09:33, Teodorescu Cristian wrote: > Hongli Lai wrote: > >Microsoft doesn't innovate, they just take old technologies, put a > >marketing campaigne around it, and claim that it's theirs. > > > > > fasle .net is not an old tech. > "XML web services"? XML has been around for a while now. And so have "web services". .NET runtime, virtual machine, or whatever remind me *a lot* of Java. Write one interface and be able to use it in every language? Can't you do that with CORBA too? |
|
From: Ioannis V. <no...@ho...> - 2002-07-02 10:33:58
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Hongli Lai > Sent: Tuesday, July 02, 2002 12:16 PM > To: Teodorescu Cristian > Cc: dev...@li... > Subject: Re: [Dev-C++] C# > > > On Tue, 2002-07-02 at 09:33, Teodorescu Cristian wrote: > > Hongli Lai wrote: > > >Microsoft doesn't innovate, they just take old technologies, put a > > >marketing campaigne around it, and claim that it's theirs. > > > > > > > > fasle .net is not an old tech. > > > > "XML web services"? XML has been around for a while now. And so have > "web services". .NET runtime, virtual machine, or whatever > remind me *a > lot* of Java. Write one interface and be able to use it in every > language? Can't you do that with CORBA too? It is the concept of Java, improved in many concepts. And if you hate a bit ms, you can think of it as the java concept, "embraced and extended", which was ms internal slogan before the court. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicy |
|
From: Santiago P. C. <San...@yd...> - 2002-07-02 10:44:19
|
Hi Mr. Cristian,
I'm not sure if this is the best solution for your 'problem', but.. what
about this code?
switch (x){
case 3 :
code3;
// NO break!!!
case 1 :
code_1;
break;
case 4 :
code 4;
// NO break!!!
case 2 :
code_2;
break ;
default:
default_code;
break;
}
Just my 2 cents,
Santy
BTW, using inline functions is at least as good solution as this or even
better, thanx Ioannis for pointing it out!! ;o)
-----Original Message-----
From: Ioannis Vranos [mailto:no...@ho...]
Sent: Tuesday, July 02, 2002 12:25 PM
To: dev...@li...
Subject: RE: [Dev-C++] C#
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Teodorescu
Cristian
Sent: Tuesday, July 02, 2002 10:32 AM
To: dev...@li...
Subject: Re: [Dev-C++] C#
Bad and good
Bad becuse they called goto.
Good beacuse it help you to define a way a good one in a switch sometimes i
have to write smth like
switch (x){
case 1 : code_1 ;break
case 2 : code_2 ;break
case 3 : code3+code 1:break
case 4 : code 4+code 2:break
default : break;
};
so in C# :
switch (x){
case 1 :code_1;
case 2 : code_2;
case 3 : code 3 goto 1;
case 4 : code_4 goto 2;
};
more simple :-)
Perhaps a bad design issue? My first solution to this is to make small
inlining functions for code1 & code2.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
--------------------------------------------------------------------------------------
This message and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. No confidentiality
or privilege is waived or lost by any wrong transmission.
If you have received this message in error, please immediately destroy it and kindly
notify the sender by reply email.
You must not, directly or indirectly, use, disclose, distribute, print, or copy any
part of this message if you are not the intended recipient. Opinions, conclusions and
other information in this message that do not relate to the official business of
Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it.
--------------------------------------------------------------------------------------
|
|
From: Ioannis V. <no...@ho...> - 2002-07-02 11:39:17
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Santiago Palmier Campos
> Sent: Tuesday, July 02, 2002 1:44 PM
> To: dev...@li...
> Subject: RE: [Dev-C++] C#
>
>
> Hi Mr. Cristian,
>
> I'm not sure if this is the best solution for your 'problem',
> but.. what
> about this code?
>
> switch (x){
> case 3 :
> code3;
> // NO break!!!
> case 1 :
> code_1;
> break;
> case 4 :
> code 4;
> // NO break!!!
> case 2 :
> code_2;
> break ;
> default:
> default_code;
> break;
> }
>
> Just my 2 cents,
> Santy
>
> BTW, using inline functions is at least as good solution as
> this or even
> better, thanx Ioannis for pointing it out!! ;o)
Yes, your solution is the best. I just got confused by all those gotos
even in C# simulation mode. A sign of what will happen to me when i will
start using MS languages. :)
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Rob <ro...@us...> - 2002-07-02 12:07:30
|
I think I'd rather write a function, even a one-liner and call it than use GOTO. Rob http://uselesspython.com original message: ----------------------------------------------------------------------- Teodorescu Cristian wrote: Ioannis Vranos wrote: <snip /> Bad and good Bad becuse they called goto. Good beacuse it help you to define a way a good one in a switch sometimes i have to write smth like switch (x){ case 1 : code_1 ;break case 2 : code_2 ;break case 3 : code3+code 1:break case 4 : code 4+code 2:break default : break; }; so in C# : switch (x){ case 1 :code_1; case 2 : code_2; case 3 : code 3 goto 1; case 4 : code_4 goto 2; }; more simple [:-)] It was something like: switch(x) { case 1: x=2; goto 3; case 3: y=4; case 5: z=6; default: // something } As i said something *like* that. So if you want to do the same job for some range of values you have to use gotos! e.g. in C++ you would do: switch(x) { case 1: case 2: case 3: cout<<"Get lost loser!\n"; break; // ... } in C# you have to do sonething like: switch(x) { case 1: goto case 3; case 2: goto case 3; case 3: something_java_like.writeconsole_something("Get lost loser!\n"); // ... } Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users -- "Giving the Linus Torvalds Award to the Free Software Foundation is a bit like giving the Han Solo Award to the Rebel Alliance." --Richard Stallman at the 1999 LinuxWorld show |
|
From: Guillermo G. <ggu...@ma...> - 2005-11-03 15:19:47
|
Tell you what Kishan,=20 Email me directly, I think I can help you out. -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Per Westermark Sent: Wednesday, November 02, 2005 11:03 PM To: KISHAN PATEL Cc: eri...@sb...; gc...@gc...; dev...@li... Subject: RE: [Dev-C++] C# Sorry, nobody knows how to do it in C# with Dev-C++. Dev-C++ is for C = and C++ programs... /Per W On Wed, 2 Nov 2005, KISHAN PATEL wrote: > > Does anyone know how to write a program that should read two numbers = and then find the smaller one and find it's square and then divide by 2 > > > > > K.N.P > > = _________________________________________________________________________= _________________________________________________________________________= _ > Search, shop, and browse smarter using tabs with the MSN Search = Toolbar-FREE! ------------------------------------------------------- = SF.Net > email is sponsored by: Tame your development challenges with Apache's = Geronimo App Server. Download it for free - -and be entered to win a > 42" plasma tv or your very own Sony(tm)PSP. Click here to play: = http://sourceforge.net/geronimo.php > _______________________________________________ Dev-cpp-users mailing = list Dev...@li... TO UNSUBSCRIBE: > http://www23.brinkster.com/noicys/devcpp/ub.htm = https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. = Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Ioannis V. <no...@ho...> - 2002-07-01 16:34:27
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Daniel Glenfield > Sent: Monday, July 01, 2002 3:09 PM > To: ra...@my...; dev...@li... > Subject: Re: [Dev-C++] C# > > > I'd be interested too if anyone can give a good definition of C#. C# is a C-style language (at least advertised as such) which permits to do the basic programming stuff (which is not a bad thing), like VB. > > I know that you have greater control over memory management > than in C++, > that's about it. And not only of memory management, and also you do not need garbage collection with C++. Also in C++ it is better to avoid explicit memory management and use standard library containers instead. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Ramana K. <ra...@my...> - 2002-07-02 07:44:38
|
THANKYOU so very much to Ioannis and his many posts demonstrating his much appreciated wealth of knowledge. Well, I have now concluded that I will stick with c++ and not bother with c#, although i will consider getting some info about the .NET API, as I am currently using the Win32 API and am finding all the reference for this in a dated .hlp file (but it works, so hey :)) I might even switch to .NET for this thing i'm writing, but it won't have to be platform-independant but anyway, you people are probably not interested thanks again ramana -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Ioannis Vranos Sent: Tuesday, 2 July 2002 2:34 AM To: dev...@li... Subject: RE: [Dev-C++] C# > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Daniel Glenfield > Sent: Monday, July 01, 2002 3:09 PM > To: ra...@my...; dev...@li... > Subject: Re: [Dev-C++] C# > > > I'd be interested too if anyone can give a good definition of C#. C# is a C-style language (at least advertised as such) which permits to do the basic programming stuff (which is not a bad thing), like VB. > > I know that you have greater control over memory management > than in C++, > that's about it. And not only of memory management, and also you do not need garbage collection with C++. Also in C++ it is better to avoid explicit memory management and use standard library containers instead. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |