• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. data comparison OR use variable without the ""

Stats

  • Replies 3
  • Subscribers 158
  • Views 915
  • Members are here 0
More Content

data comparison OR use variable without the ""

Guye
Guye over 11 years ago

Hi,

 when assigning a variable with a text or a number there are "" with it.

for example:

aaa="name"

aaa will be "name" and not name .

same with numbers.

bbb="0.0" 

bbb will be "0.0" and not 0.0

 is there any way to remove the ""? 

 

when using this varible - the comparison is problematic.

see example:

if(aaa=name then

do something

else

do something else

 )

 

is there any way to remove the "" or just ignore it when using the variable?

 

Thanks,

Guy 

  • Sign in to reply
  • Cancel
  • Randy R
    Randy R over 11 years ago

    Try one of these:

    aaa='name 

    or 

    if( stringToSymbol(aaa)=='name then

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Guye
    Guye over 11 years ago

    Thanks!

    it works just fine.

    one other issue, how can i print (printf/fprintf etc.) a sentence without the ""

     

    for example:

     fprintf(list("the time is:" getCurrentTime())

    this prints:

    "the time is:" `the current time`

    i would like to print:

    the time is: `the current time`

     

    thanks,

    Guy 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Randy R
    Randy R over 11 years ago

    Try this:

    fprintf("the time is: %s\n" getCurrentTime())

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information