Solved

Variable names with hyphens?

Posted on 2006-06-20
2
503 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 250 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

707 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