Message 1 of 13
amend my script

Not applicable
12-16-2020
09:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
(if (and a b)
(progn
(if (assoc a lst)
(setq lst (subst (cons a (+ b (cdr (assoc a lst)))) (assoc a lst) lst))
(setq lst (cons (cons a b) lst))
);; if
(setq a nil b nil)
);; progn
);; if
When I use the above code in my script I am getting the values in the below format
(("PART01" . 6.0)("PART02" . 4.0)("PART03" . 3.5))
But I am looking for a way to add quotations to all second items aswell inside the list like below:
(("PART01" . "6.0")("PART02" . "4.0")("PART03" . "3.5"))