473,806 Members | 2,321 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

int is out of scope???

PJ6
(VS2003)

? int.Parse("2.0" )
error: identifier 'int' out of scope
? "foo".IndexOf(" o")
error: expression '"foo".Index Of' out of scope

For the love of god, why is int and other basic stuff out of scope in my
Command window when I'm debugging?

VB doesn't do this, is this a C# thing?

Paul
Apr 6 '07 #1
7 2363
On Apr 6, 10:21 am, "PJ6" <n...@nowhere.n etwrote:
(VS2003)

? int.Parse("2.0" )
error: identifier 'int' out of scope
? "foo".IndexOf(" o")
error: expression '"foo".Index Of' out of scope

For the love of god, why is int and other basic stuff out of scope in my
Command window when I'm debugging?

VB doesn't do this, is this a C# thing?

Paul
Try adding a ; to the end of your statement..

Apr 6 '07 #2
PJ6
"Andy" <an***@med-associates.comw rote in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
On Apr 6, 10:21 am, "PJ6" <n...@nowhere.n etwrote:
Try adding a ; to the end of your statement..
Try testing your recommendations .
Apr 6 '07 #3
"PJ6" <no***@nowhere. netwrote in message
news:u6******** ******@TK2MSFTN GP04.phx.gbl...
"Andy" <an***@med-associates.comw rote in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
>On Apr 6, 10:21 am, "PJ6" <n...@nowhere.n etwrote:
Try adding a ; to the end of your statement..

Try testing your recommendations .
Nice attitude.
Good luck solving your problem
Apr 6 '07 #4
PJ6 wrote:
(VS2003)

? int.Parse("2.0" )
error: identifier 'int' out of scope
? "foo".IndexOf(" o")
error: expression '"foo".Index Of' out of scope

You'll be pleased to know that both examples work fine in VS2005 :-/

In VS2003 the following works OK:
?Int32.Parse("2 ")

and even
?"foo".Lengt h

however, I can't get:
?"foo".IndexOf( 'o')
to work.

--
Thank you,

Christopher Ireland
Apr 6 '07 #5
j
? "foo".IndexOf(' o')
works...in vs2005
I kept getting "Command "?"foo".IndexOf ('o')" is not valid.", until I
added the space.

On Apr 6, 10:44 am, "Christophe r Ireland" <cirel...@gmail .comwrote:
PJ6 wrote:
(VS2003)
? int.Parse("2.0" )
error: identifier 'int' out of scope
? "foo".IndexOf(" o")
error: expression '"foo".Index Of' out of scope

You'll be pleased to know that both examples work fine in VS2005 :-/

In VS2003 the following works OK:
?Int32.Parse("2 ")

and even
?"foo".Lengt h

however, I can't get:
?"foo".IndexOf( 'o')
to work.

--
Thank you,

Christopher Ireland

Apr 6 '07 #6
On Apr 6, 10:37 am, "PJ6" <n...@nowhere.n etwrote:
Try testing your recommendations .
I did, it worked. Maybe next time you should try the proper group:
microsoft.publi c.vstudio.gener al

Apr 6 '07 #7
PJ6
I'm sorry for this post, Andy, I was angry at having to use C#, and moving
down from 2005 to 2003.

I'll try harder to be more polite in the future, I value the help I receive
in these newsgroups.

Paul

"PJ6" <no***@nowhere. netwrote in message
news:u6******** ******@TK2MSFTN GP04.phx.gbl...
"Andy" <an***@med-associates.comw rote in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
>On Apr 6, 10:21 am, "PJ6" <n...@nowhere.n etwrote:
Try adding a ; to the end of your statement..

Try testing your recommendations .

May 3 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6479
by: Anonymous | last post by:
Is namespace the same thing as scope? While reading the book "Thinking in C++", I was under the impression that namespace is, well, a namespace--a feature to create a hiearchy for identifiers within the Global Namespace. And that, all identifiers within a given namespace, however deeply nested they are, each of them has the Global Scope. So, if namespace outer { int a = 1;
6
3166
by: pembed2003 | last post by:
Hi all, I am reading the book "C++ How to Program" and in the chapter where it discuss scope rule, it says there are four scopes for a variable: function scope file scope block scope function-prototype scope I think(might be wrong):
5
2097
by: pembed2003 | last post by:
Hi all, I am reading the book "C How to Program" and in the chapter where it discuss scope rule, it says there are four scopes for a variable: function scope file scope block scope function-prototype scope I think(might be wrong):
8
3393
by: TTroy | last post by:
I have a few questions about "scope" and "visibility," which seem like two different things. To me "visibility" of the name of a function or object is the actual code that can use it in an actual program. To me "scope" of the name of a function or object are the general rules for the areas of a program that can through a declaration, have "visibility."
3
3436
by: marco_segurini | last post by:
Hi, I am using VS 2005. If I compile the following code only line 6 returns me an error while line 9 returns a warning. If I comment the line 6 and debug the program the assignments of lines {9, 11} work fine. Why the '.' "scope operator" is accepted in line 9 and not in line 6?
39
3204
by: utab | last post by:
Dear all, Is there a clear distinction how to decide which functions to be members of a class and which not How is your attitude (Your general way from your experiences ...) "If the function changes the state of the object, it ought to be a member of that object." Reference Accelerated C++, A. Koenig, page 159.
7
2198
by: Christian Christmann | last post by:
Hi, I've a a question on the specifier extern. Code example: void func( void ) { extern int e; //...
1
2586
by: Steven T. Hatton | last post by:
All of the following terms are used in some way to describe where and how a name is relevant to a particular location in a program: visible, declarative region, scope, potential scope, valid, introduced, used, potentially evaluated and accessible. They all seem to have subtle difference in meanings. Any positive contribution to the following will be appreciated. Here is my attempt to make sense of these:
1
25704
pbmods
by: pbmods | last post by:
VARIABLE SCOPE IN JAVASCRIPT LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN ) PREREQS: VARIABLES First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause bad breath)? Scope describes the context in which a variable can be used. For example, if a variable's scope is a certain function, then that variable can only be used in that function. If you were to try to access that variable anywhere else in...
1
3762
by: Giacomo Catenazzi | last post by:
Hello, To learn the details of C, I've build the following example, could you check if it is correct and if it miss some important cases? Are there some useful (real cases) examples of: - "function prototype scope" for structures and unions? - "extern" for internal linkage ?
0
10618
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10371
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10110
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4329
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3850
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.