473,406 Members | 2,710 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,406 software developers and data experts.

how do you Dim a non valid identifier

18
scenario:
im working on a periodic table of elements with buttons for each element-done
next step. textbox + chemistry formulas = grams to mole conversions/ moles to L/ moles to molecules.

the problem I'm having is dimming the chemicals Arsenic(As) and Indium(In) i need to dim these as integers = to their atomic mass G/Moles. but i am not able to Dim them because they are highlighted in blue and the help tip comes up as "keyword is not a valid identifier" is there anyway i can tell VB to not use "In" and "As" how it normally does and use it for integer values?

please get back at me with any related help. thanks!

-negus
Feb 26 '10 #1
1 1803
tlhintoq
3,525 Expert 2GB
Please provide the code that is producing the error

How I would do it:
Make a class such as 'Element' which has all the various properties, then make a list of them.

C# code... sorry... but you get the concept and should be able to do in VB
Expand|Select|Wrap|Line Numbers
  1. List<Element> TableOfElements = new List<Element>();
  2. public class  Element
  3. {
  4.     public string Name { get; set; }
  5.     public float Mass { get; set; }
  6.     public string Abbreviation { get; set; }
  7.     public int Number { get; set; }
  8. }
  9.  
  10. public void MakeElement(string NewName, float NewMass, string NewAbbreviation)
  11. {
  12.     Element NewElement = new Element();
  13.     NewElement.Name = "Oxygen";
  14.     NewElement.Mass = 15.9994f;
  15.     NewElement.Abbreviation = "O";
  16.     NewElement.Number = 8;
  17.     TableOfElements.Add(NewElement);
  18. }
Feb 26 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Justin Koivisto | last post by:
OK, on my quest to get one PHP site that is actually valid XHTML 1.0 (strict)... PHP 4.3.8: session.use_trans_sid=1 What is happening is the validator (that doesn't use cookies) sees things...
11
by: Phil Amey | last post by:
In a web based form I am able to make sure that there is text in an input field but I want to force the user into inputting a valid email address, one that has @ in the address How can I modify...
38
by: Jukka K. Korpela | last post by:
As well all know, valid markup is important... but when trying to find a convincing modern argument in favor of this, I found pages like http://www.htmlhelp.com/tools/validator/reasons.html which...
8
by: Petter Reinholdtsen | last post by:
I ran into a problem on HP-UX 11.00 the other day, where it refused to compile a program using 'using namespace std;' at the top. The reason seem to be that the compiler refuses to accept 'using...
64
by: jrefactors | last post by:
Since C is a subset of C++, so any C code or C libraries (printf(), scanf(), etc...) are valid C++ code. Is that correct? so even though the whole program is written in C, but with .cpp...
5
by: Sriram Rajagopalan | last post by:
Hi, Is the extra comma at the end of an enumerator-list valid according to the C standards? With the gcc compiler the following is valid: enum DAYS {MONDAY, TUESDAY, }day1; gcc does not...
2
by: Marc Bishop | last post by:
I have an image button control within a repeater control. <asp:ImageButton id='<%# Container.DataItem("ProductID")%>' runat="server" ImageUrl="images/noimage.gif" OnClick="RemoveItem"...
3
by: Sfj | last post by:
Hello folks, Old programmer learning new tricks. I think similar issues have been posted, but I would like to ask some help with the following code... select , as ,, from as t1 left outer...
3
by: Marek Zgadzaj | last post by:
I've got the following warning: "The class name '?' is not a valid identifier for this language. " I could not find what is the reason of this warning because the line/column number are 0. There...
11
by: Kurda Yon | last post by:
Hi, I got this warning: mysql_query(): 4 is not a valid MySQL-Link resource. The line which cause this warning is: mysql_query("insert into $tablename (id,priority) values('$id', '0.00')",...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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.