Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me find the error in my modification of a SKILL code

Status
Not open for further replies.

hatebbs

Newbie level 3
Newbie level 3
Joined
Sep 10, 2004
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
32
mod skill cadence

I've encountered some SKILL problems when I want to modify a useful SKILL code. This SKILL code is for placing the labels in an array manner. No matter how I modifed it will always show "*Error* eval: unbound variable - if". Can anyone help me please?
Original:
labcount = 1
while(labcount <= numOlabs
sprintf(tmp "%s%d%s" label startnum labels)
dbCreateLabel( getEditRep() list( layer "pin" ) location tmp
just rotate fontname fontheight)
location = list( xCoord(location)+xSpace yCoord(location+ySpace)
startnum = startnum + countby
labcount = labcount +1
geRefresh()
Modified:
while(labcount <= numOlabs
sprintf(tmp "%s%d%s" label startnum labels)
dbCreateLabel( getEditRep() list( layer "pin" ) location tmp
just rotate fontname fontheight)
if ( mod(labcount 32)==0 then
xS=xPitchdiff
yS=yPitchdiff
else
xS=xSpace
yS=ySpace
)
location = list( xCoord(location)+xS yCoord(location)+yS)
startnum = startnum + countby
labcount = labcount +1
geRefresh()
 

geteditrep

I think you have a match problem with your open brackets
 

Re: SKILL help on mod and if

An extra space exists after the word 'if'. This will lead the error message you posted.
I also didn't find the close parenthesis for 'while' statement. I have added it in the following code.
Code:
while(labcount <= numOlabs 
  sprintf(tmp "%s%d%s" label startnum labels) 
  dbCreateLabel( getEditRep() list( layer "pin" ) location tmp 
    just rotate fontname fontheight) 
  if( mod(labcount 32)==0 then 
    xS=xPitchdiff 
    yS=yPitchdiff 
  else 
    xS=xSpace 
    yS=ySpace 
  ) 
  location = list( xCoord(location)+xS yCoord(location)+yS) 
  startnum = startnum + countby 
  labcount = labcount +1
)
geRefresh()
 

Re: SKILL help on mod and if

Thanks a lot for your comments and help! :)
 

SKILL help on mod and if

Normally i use Visual lisp(Autolisp) editor to check the missing bracket for simple skill programs .Does cadence has editor like vlisp editor that autodesk provides
 

SKILL help on mod and if

Vi can check the missing bracket. Use '%' in command mode to find the matching bracket. Turning on the 'showmatch' switch will automatically show the matching bracket during input.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top