473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Space Character in Naming

Hi,

VB6 permitted the use of the space character in naming when enclosed with square brackets. This was particularly useful when creating enumerations such as:

Enum FruitTypes
[Apples and Oranges]
[Bananas and Pears]
End Enum

I would like to do the equivalet in VB.NET. Not only would this be useful for enumerations, but also for property names used in the property grid control.

VB.NET does not seem to support use of the square brackets as in VB6. However, NO WHERE do I see whether there is an alternate way of doing this. NO WHERE do I see it documented what characters are allowed in VB.NET naming.

Does anyone know if this is possible in VB.NET. Also, can someone point me to something that documents what characters are permitted in VB.NET naming?

Thanks!

- Bob

Nov 20 '05 #1
4 6768
* =?Utf-8?B?Qm9iIFF1aW5u?= <an*******@discussions.microsoft.com> scripsit:
VB6 permitted the use of the space character in naming when enclosed
with square brackets. This was particularly useful when creating
enumerations such as:

Enum FruitTypes
[Apples and Oranges]
[Bananas and Pears]
End Enum

I would like to do the equivalet in VB.NET. Not only would this be
useful for enumerations, but also for property names used in the
property grid control.


I don't think that this is supported and I have never seen it in a .NET
component.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Bob,
As Herfried stated, Its not permitted.

The language specification for VB.NET can be found at:

http://msdn.microsoft.com/library/de...bSpecStart.asp

Identifies specifically are defined at:

http://msdn.microsoft.com/library/de...fVBSpec2_2.asp

Note: If the above links don't give the characters allowed directly, they
are in that section of MSDN!

The following describes what you can do for the Property Grid:

http://msdn.microsoft.com/library/de...ngpropgrid.asp

Hope this helps
Jay

"Bob Quinn" <an*******@discussions.microsoft.com> wrote in message
news:0B**********************************@microsof t.com...
Hi,

VB6 permitted the use of the space character in naming when enclosed with square brackets. This was particularly useful when creating enumerations
such as:
Enum FruitTypes
[Apples and Oranges]
[Bananas and Pears]
End Enum

I would like to do the equivalet in VB.NET. Not only would this be useful for enumerations, but also for property names used in the property grid
control.
VB.NET does not seem to support use of the square brackets as in VB6. However, NO WHERE do I see whether there is an alternate way of doing this.
NO WHERE do I see it documented what characters are allowed in VB.NET
naming.
Does anyone know if this is possible in VB.NET. Also, can someone point me to something that documents what characters are permitted in VB.NET
naming?
Thanks!

- Bob

Nov 20 '05 #3
I've been through all of that documentation and no where does it state what characters are acceptable for names nor is there any mention about the use of space one way or the other. I suspect, however, that you both are right. It just seems like somewhere there should be something that documents what characters are allowed

Thanks again

- Bo

Nov 20 '05 #4
Bob,
It just seems like somewhere there should be something that
documents what characters are allowed. It is! Its on the page I gave you earlier!

http://msdn.microsoft.com/library/de...fVBSpec2_2.asp

Look at the Gray box at the bottom of the page. Which I have included
inline. The Gray box is in a BNF format (a form of Regular Expression).

Specifically the AlphaCharacter, NumericCharacter, CombiningCharacter,
FormattingCharacter and UnderscoreCharacter declarations, the other lines
indicate how these declarations are combined.

Identifier ::=
NonEscapedIdentifier [ TypeCharacter ] |
EscapedIdentifier
NonEscapedIdentifier ::= < IdentifierName but not Keyword >
EscapedIdentifier ::= [ IdentifierName ]
IdentifierName ::= IdentifierStart [ IdentifierCharacter+ ]
IdentifierStart ::=
AlphaCharacter |
UnderscoreCharacter IdentifierCharacter
IdentifierCharacter ::=
UnderscoreCharacter |
AlphaCharacter |
NumericCharacter |
CombiningCharacter |
FormattingCharacter
AlphaCharacter ::=
< Unicode alphabetic character (classes Lu, Ll, Lt, Lm, Lo, Nl) >
NumericCharacter ::= < Unicode decimal digit character (class Nd) >
CombiningCharacter ::= < Unicode combining character (classes Mn, Mc) >
FormattingCharacter ::= < Unicode formatting character (class Cf) >
UnderscoreCharacter ::= < Unicode connection character (class Pc) >
IdentifierOrKeyword ::= Identifier | Keyword

Now you need to know what Unicode classes are (Lu, Ll, Lt, Lm, Lo, Nl, Nd,
Mn, Mc, Cf, Pc), I normally refer to this page for that.
http://msdn.microsoft.com/library/de...classtopic.asp

I'm sure there are other pages that map the Unicode Classes to
characters in a more straight forward manner. Alternatively you can use the
Character Map in NT, 2000, and XP to "Group By" Unicode class to see
characters in just that class...

Hope this helps
Jay

"Bob Quinn" <an*******@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com... I've been through all of that documentation and no where does it state what characters are acceptable for names nor is there any mention about the
use of space one way or the other. I suspect, however, that you both are
right. It just seems like somewhere there should be something that
documents what characters are allowed.
Thanks again!

- Bob


Nov 20 '05 #5

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

Similar topics

12
by: lawrence | last post by:
I'm bad at regular expressions. Is this how I would look for any set of characters that go more than 60 characters without a white space? ..{60} Also, does this match a block of PHP in an...
2
by: barb28 | last post by:
Hello, sometimes I have noticed that in web addresses, the number: 20% will show up in the address. I think this is somehow related to a 'blank space', but am unsure, does anyone know about...
28
by: Andreas Prilop | last post by:
Jukka reports on http://www.cs.tut.fi/~jkorpela/chars/spaces.html that Internet Explorer 6 fails on the "zero width space" U+200B ​ Is this observation still valid? For which versions of MS...
3
by: sudhaoncyberworld | last post by:
Hi var lbl=document.createElement('LABEL'); var txt=document.createTextNode('text'); lbl.appendChild(txt); in above txt node i want a space infront of that i tried below, but no use
13
by: Bryan Parkoff | last post by:
I have seen that C/C++ Compiler supports long filename up to 254 characters plus the extension. Can header files and source code files accept space between alphabet character and numeric...
2
by: Kannan | last post by:
In section 7.19.6.1 on ISO C specification, it says about a format character "space". When and how we will use this "space" format? I mean is there a usage, for e.g. like printf("%space",...); ? ...
3
by: kvnsmnsn | last post by:
I've written the following Javascript file that includes an input text field and an output text field, the latter of which is initialized to zero. Each time the user enters a number in the input...
1
by: seahorse298 | last post by:
I am using MS Access 2000 on a Windows XP machine. I have a list form, listing the number of companies a business is dealing with. I have a filter field on the form which is used to filter the...
5
by: vlsidesign | last post by:
The printf function returns "warning: unknown escape sequence: \040" for a backslash-space combination. If the ascii decimal number for space is 32 and the backslash is 92, why this particular...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.