I am interpreting a program lisp from someone,like this; (cons 1 (strcat Ade (itoa 55))) (strcat Ade (itoa 55))-----> "Ade55" (cons) ------>Adds an element at the beginning of a list (cons 1 -----> ????? I don't know what meaning of cons 1 (meaning value "1"),can anybody help me to explain it Thanks you for your attentions Best regards Ade Suharna
: Ade, CONS is used to CONStruct a DOTTED PAIR. This function is used when the DFX code number (tag) requires a new Value assigned to it. A dotted pair is the basis of computers. The DFX code (tag) of 1 is text value. It is a String. There are also DFX codes for Integers and Reals. The computer does not know what your text value is, so a TAG is assigned to store this information. The computer will then extract the value assigned to the tag for intepretation. This example the tag of 1 is string of text. This string of text is displayed on the screen. Others include layer name (8), color (62) and linetype (6). Text position, scale factors, heights, and endless other tags are also present here. If ADE = "Speed Limit " and ITOA means convert a Integer into a String, STRCAT is combine => which results "Speed Limit 55". Look at this... ADE="Speed Limit " <--- a dotted pair! ........... Look inside any INI file and you see a pattern "="... Tag is set to a value. Tag and value are separated with an equal sign. The INI file also has headers (or divisions) separating a group of tags. Also look in the registry. Start button, Run, and fill in the field with "REGEDIT". Expand the folders and you will see tags with corresponding values assigned to the tag. .............. All programs that require (custom) settings will have this dotted pair to interpret. Each editor will have its own unique tag structure. When writing lisp for AutoCAD, it is helpful to know the DFX codes (tag structure). You cannot assign a new tag; just new values. Does this make any sense? Footnote: APPEND is used to add a dotted pair to an entity when the pair is not present. Example includes forcing a color, linetype, or linetype scale to the entity (through CHPROP). Some tags are mandatory, others optional. CONVERSIONS BETWEEN REALS, INTEGERS and STRINGS: ITOA = Integer to alpha (string). RTOS = Real to string. DISTOF = String to Real. (don't ask why it is not ATOR) ATOI = Alpha (string) to Integer. FIX = Real to Integer. Hope this helps... Scot-65