Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lisp Routine 1

Status
Not open for further replies.

tendai1

Structural
Mar 29, 2003
24
0
0
GB
Given a variable defined as (setq a '(-10 -20 10 20))
Can you help me to find the Max or Min of a (i.e. using the variable a). I would appreaciate anything other than (max -10 -20 10 20).
 
Replies continue below

Recommended for you

Thanks it worked well, is there a command which can sort numbers i.e. (min - - - - - max) just like we can sort letters alphabetically.
 
For sorting numbers in Acad2000 and above, you can use
the following: (vl-sort x '<) where 'x' is the list of
numbers you want sorted from min to max.
 
Status
Not open for further replies.
Back
Top