Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Variable names with hyphens?

Posted on 2006-06-20
2
Medium Priority
?
505 Views
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"
0
Comment
Question by:cipiWeb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
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.
0
 

Author Comment

by:cipiWeb
ID: 16944190
Thank you for your help once again.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

618 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