Wednesday, December 03, 2008     Register | Login | Search | Contact Us
     

Many of you already received communications about the move of the Cadence user community into cadence.com. And many of you have already joined, with over 4000 registrations in the first two weeks.

The new Cadence Community enhances the ability of Cadence users to connect and collaborate. In addition to moving the community into cadence.com -- enabling single sign-on for community, Sourcelink and Cadence events -- the new site is organized around nine technology segments, giving you easy access to product information, training, forums and blogs. Some of the new features include:
  • Ability to respond to posts via e-mail
  • Technology-specific blogs
  • Latest Web 2.0 social networking capabilities
  • Public profile options
  • Private messaging
  • Friends lists
Visit the new Cadence Community today at www.cadence.com/community and join the discussions!

Registration note: Due to the scope of the enhancements and the new SSO registration system, we were not able to migrate existing cdnusers.org member accounts. So new registrations are required, but this enables a broader set of functionality we think you'll enjoy.

Forum note: Under the guidance of forum moderators, we have taken the 20+ cdnusers.org forums and consolidated them into 11 forums on the new site. Posts have been brought over so you can leverage that posting history. CDNusers forums will be set to read only starting 7/30, and cdnusers.org will be redirected to the new community on 8/4.

Best regards,
Mike and Tom

Michael A. Catrambone - Steering Committee Chairman
Distinguished Engineer
PCB/Mechanical
UTStarcom, Inc.

Tom Diederich
Cadence Community Manager
Home
Forums
Subject: % in string
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
willbi
Posts: 63
Online: User is Offline
8/15/2007 3:58 AM  
Hello all

I have a deviceType containing a %
RSMD0603_1/16W-33,1%

I want to use it with other informations on a status area of a form.

So I use this function:
printf(statusTxt "%s:%s [%s]" refdes rDev rPath)
axlUIWPrint(nmForm statusTxt)

But I got this message E- *Error* fprintf/sprintf: illegal format spec. - "R8:RSMD0603_1/16W-33,1% [lhc_1tfbk(sch_1):page1_i3->clock_distr1(sch_1):page1_i109]"

If I removed the % in rDev, it works.
Then the % is the problem.
How can I do to avoid this?
I tried with a strcat, but not better.

Thanks in advance.
cdavies
Moderator
Posts: 55
Online: User is Offline
8/15/2007 5:50 AM  
Try using sprintf instead of printf.

Charlie Davies
natebizu
Posts: 7
Online: User is Offline
8/15/2007 8:23 AM  
axlUIWPrint acts just like a printf, so there is no need for the statusTxt variable

use this instead:
axlUIWPrint(nmForm "%s:%s [%s]" refdes rDev rPath)

no error will occur, but it will not show the "%" character
willbi
Posts: 63
Online: User is Offline
8/15/2007 11:48 PM  
Of Course Charlie, I was using sprintf. It was a bad select of copy/paste, I forgot the s.



Thanks natebizu for the tip.

But to avoid this error, I removed the % in the string before Print it.

So the solution has the same behaviour as you said: the % is not displayed!



So my code shows a devicetype for a refdes to allow the selection in a list of all devicetypes in the BRD and the one shown is then not the same than the one in the list.



Nice thing to remove what disturbs... like Allegro that does not support the "!" in text .....
cdavies
Moderator
Posts: 55
Online: User is Offline
8/16/2007 6:28 AM  
Try this.

statusTxt = sprintf(nil "%s:%s [%s]" refdes rDev rPath)
axlUIWPrint(nmForm statusTxt)

Charlie Davies
willbi
Posts: 63
Online: User is Offline
8/17/2007 12:29 AM  
Charlie,

I got the same error with your proposal. Never mind.
Thanks.
Posting to forums is available to community members only.
Login or Register



ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.