Progrma clisp
(loop
(format t "~& ~%")
(format t "~& **** MENU****")(format t "~& ~%")
(format t "~& DATOS PERSONAS: (Nombre Apellido Telefono (Direccion))")
(format t "~& ~%")
(format t "~& 1 -> Buscar los datos por el Nombre")(format t "~& 2 -> Editar un archivo")
(format t "~& 3 -> Listar desde un archivo")
(format t "~& 4 -> buscar los datos por el Apellido")
(format t "~& 5 ->Reproducir los datos desde el archivo")
(format t "~& 6 -> Salir")
(format t "~& ~%")
(format t "~& Ingrese su opcion: ")
(setq opcion (read))
(formatt "~& ~%")
(cond
((eq opcion 1)
(format t "~&Nombre archivo: ")
(setq na (read))
(with-open-file (stream na)
(loop
(setq y (read stream))(when (eq y 'FIN) (return t))
(setq nomb (car y))
(setq apel (cadr y))
(setq tel (caddr y))
(setq dir (cadddr y))
(setf (get nomb 'Apellidos)apel)
(setf (get nomb 'Telefono) tel)
(setf (get nomb 'Direccion) dir)
)
)
(format t "~&Nombre a buscar: ")
(setq nomb (read))
(format t "~&Propiedad abuscar (Apellidos Telefono Direccion): ")
(setq propiedad (read))
(setq valor (get nomb propiedad))
(format t "~S ~%" valor)
(symbol-plist nomb)
(format t "~&~%")
(format t "~&Pulse C seguido de ENTER para continuar ")
(read)
)
((eq opcion 4)
(format t "~&Nombre archivo: ")
(setq na (read))
(with-open-file(stream na)
(loop
(setq y (read stream))
(when (eq y 'FIN) (return t))
(setq nomb (car y))
(setq apel (cadr y))
(setq tel (caddr y))
(setq dir (cadddr...
Regístrate para leer el documento completo.