Thursday, January 08, 2009     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: Problem about teh strcat command
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
leonlee
Posts: 81
Online: User is Offline
2/13/2006 8:00 PM  
I'm a newcomer, and I'm studying the SKILL.
I wrote some code to report the dummy net pin and single pin( or unconnected pin), then asign the list to a form, browse them one by one. But one problem occured. For some projects, there is a error information for strcat command:
Error* strcat: argument #1 should be either a string or a symbol

The part of code is like this:

let((Pin_List Dummy_Pin_List Single_Pin_List)
Pin_List=Dummy_Pin_List=Single_Pin_List=nil
foreach( item Pin_List
if(item->net->name=="" then
Dummy_Pin_List=cons(strcat(item->component->name "." item->number) Dummy_Pin_List)
Dummy_Pin_List=sort(Dummy_Pin_List 'alphalessp)
else
if(length(item->branch->children)==1 then
Single_Pin_List=cons(strcat(item->component->name "." item->number " / " item->net->name) Single_Pin_List)
Single_Pin_List=sort(Single_Pin_List 'alphalessp)
);if
);if
);foreach
);let

Who can help me with this problem. thanks.

Leon Lee
Schneider-Electric
leonlee
Posts: 81
Online: User is Offline
2/13/2006 8:06 PM  
of course

The Pin_List is generateed by below code:

axlDBRefreshId(axlDBGetDesign())
axlClearSelSet()
axlSetFindFilter(?enabled '(noall pins) ?onButtons '(noall pins))
Pin_List=axlGetSelSet(axlAddSelectAll())

Leon Lee
Schneider-Electric
AshCan
Posts: 20
Online: User is Offline
2/13/2006 8:20 PM  
You are getting every pin record in the board database. Some of theins may be mechanical pins which have no number value. Then when you strcat item -> number strcat fails as you are seeing.

Try adding a conditional that traps null item -> numbers
For example
if(item -> number != nil then
leonlee
Posts: 81
Online: User is Offline
2/13/2006 8:24 PM  
OK, thank you very much for your answer.
I'll try it soon~~~

Leon Lee
Schneider-Electric
natan
Posts: 1
Online: User is Offline
2/13/2006 11:57 PM  
Another technique to address unwanted nil values is to use OR:
strcat(x y item->number||"" z)
Since 'or' stop evaluating on non-nil ("true") values from left to right.

And not related to your question - you should sort once after
the foreach statement (for improved performance).
leonlee
Posts: 81
Online: User is Offline
2/14/2006 4:29 AM  
Ok, the reason is:

for the mechanical pin, item->component=nil item->nuber=""(null)

I ignored it~~~

Leon Lee
Schneider-Electric
Posting to forums is available to community members only.
Login or Register

Forums > Silicon-package-board > Shared code - SKILL > Problem about teh strcat command


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.