• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 506
  • Last Modified:

Variable names with hyphens?

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
cipiWeb
Asked:
cipiWeb
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you CANNOT use hyphens in variables, they would be considered as substractions.
you migth use underscore (_) instead.
0
 
cipiWebAuthor Commented:
Thank you for your help once again.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now