mkb
Guest
Hello.
I am trying to create a program in lisp where I need to create a number of lists that depends on user input,
we say for simplicity that the program must ask how many classes of 10 pupils has a teacher, and for each class it puts in the names of the pupils in a special list
My code that I carry under turns but does not do what I want, does not create a set of lists
Namely
Name
Namelist3
....
in which it inserts the names of the students but simply a single name list
Name
Here is the code
(defunc c:class()
(setq nclassi(getint "invents the number of classes : ")))
(setq cont)
(repeat nclasses)
(setq n(itoa cont))
(setq nomelist(strcat "nomelista" n)
(namelist print)
(setq namelist(list ))
(repeat 10)
(seq nallievo(list (getstring "study name: ")))))
(Sectq Namelist(Nallievo Namelist Append))
)
(namelist print)
(setq cont(+ cont 1))
); end repeat
); end deceased
thanks to all
mk
I am trying to create a program in lisp where I need to create a number of lists that depends on user input,
we say for simplicity that the program must ask how many classes of 10 pupils has a teacher, and for each class it puts in the names of the pupils in a special list
My code that I carry under turns but does not do what I want, does not create a set of lists
Namely
Name
Namelist3
....
in which it inserts the names of the students but simply a single name list
Name
Here is the code
(defunc c:class()
(setq nclassi(getint "invents the number of classes : ")))
(setq cont)
(repeat nclasses)
(setq n(itoa cont))
(setq nomelist(strcat "nomelista" n)
(namelist print)
(setq namelist(list ))
(repeat 10)
(seq nallievo(list (getstring "study name: ")))))
(Sectq Namelist(Nallievo Namelist Append))
)
(namelist print)
(setq cont(+ cont 1))
); end repeat
); end deceased
thanks to all
mk