J
JDole
Guest
Hello all,
Sorry if this question has been asked before. I have the following
SKILL function and I noticed that evaluating CMD1 and CMD2 retrieves
different info from list1 and list2. The difference between the two list
is that list1 is formed using '( ) operator while list2 list("....")
function. Appreciate any help from more knowledgeable coder. Thanks.
======================== CUT HERE ====================
procedure(proc1( )
let((list1 list2 cmd1 cmd2 item1 item2)
list1 = '(nil CELL pmos PINNAME g LAYER metal1 PURPOSES drawing)
list2 = list(nil "CELL" "pmos" "PINNAME" "g" "LAYER"
"metal1" "PURPOSES" "drawing")
printf("LIST1: %L\n", list1);
;; prints ----> (nil CELL pmos PINNAME g LAYER metal1
PURPOSES drawing)
printf("LIST2: %L\n", list2);
;; prints ----> (nil "CELL" "pmos" "PINNAME" "g" "LAYER"
"metal1" "PURPOSES" "drawing")
cmd1 = strcat("list1" "->" "LAYER");
item1 = evalstring(cmd1);
cmd2 = strcat("list2" "->" "LAYER");
item2 = evalstring(cmd2);
printf("CMD1= %s ITEM1: %L\n", cmd1 item1);
; prints -----> "metal1" <---- THIS IS DIFFERENT
printf("CMD2= %s ITEM2: %L\n", cmd2 item2);
; prints -----> "nil" <---- THIS IS DIFFERENT
);
);
Sorry if this question has been asked before. I have the following
SKILL function and I noticed that evaluating CMD1 and CMD2 retrieves
different info from list1 and list2. The difference between the two list
is that list1 is formed using '( ) operator while list2 list("....")
function. Appreciate any help from more knowledgeable coder. Thanks.
======================== CUT HERE ====================
procedure(proc1( )
let((list1 list2 cmd1 cmd2 item1 item2)
list1 = '(nil CELL pmos PINNAME g LAYER metal1 PURPOSES drawing)
list2 = list(nil "CELL" "pmos" "PINNAME" "g" "LAYER"
"metal1" "PURPOSES" "drawing")
printf("LIST1: %L\n", list1);
;; prints ----> (nil CELL pmos PINNAME g LAYER metal1
PURPOSES drawing)
printf("LIST2: %L\n", list2);
;; prints ----> (nil "CELL" "pmos" "PINNAME" "g" "LAYER"
"metal1" "PURPOSES" "drawing")
cmd1 = strcat("list1" "->" "LAYER");
item1 = evalstring(cmd1);
cmd2 = strcat("list2" "->" "LAYER");
item2 = evalstring(cmd2);
printf("CMD1= %s ITEM1: %L\n", cmd1 item1);
; prints -----> "metal1" <---- THIS IS DIFFERENT
printf("CMD2= %s ITEM2: %L\n", cmd2 item2);
; prints -----> "nil" <---- THIS IS DIFFERENT
);
);