Variable names with hyphens?

Posted on 2006-06-20
Medium Priority
Last Modified: 2008-02-26
I have product numbers set as a primary key. I also want to use these product numbers to make a variable name. I already have a method of pulling

my product numbers appear in the following format: 1234-5678

My question is this. How can I make a variable with a hyphen in it's name? or will it always think str1234-5678 is subtract 5678 from str1234?

My goal is the following:

str1234-0001 = "Product A"
str1234-0002 = "Product B"
str1234-0003 = "Product C"
Question by:cipiWeb
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 1000 total points
ID: 16943740
you CANNOT use hyphens in variables, they would be considered as substractions.
you migth use underscore (_) instead.

Author Comment

ID: 16944190
Thank you for your help once again.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
There is a wide range of advantages associated with the use of ASP.NET. This is why this programming framework is used to create excellent enterprise-class websites, technologies, and web applications.
Through the video, you can check the migration process of Outlook PST file to PDF. Kernel for Outlook to PDF tool can convert Outlook emails with all attributes like Subject, To, From, Cc, Bcc and other folders such as Inbox, Outbox, Sent Items, Jun…
If you are looking for an automated tool which can generate reports for Outlook emails and other items from PST file, then you can go for Kernel PST Reporter tool. The reports which are created by this tool are helpful to analyze and understand PST …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question