Hi Jaime ,
Thx for answer,
I have made function for creating xpm file:
;============== beginning of code ============
; definition of function
(defun write_To_XPM_File (file)
; initial values
( let
(iWidth 4) ; the pixmap width
(iHeight 4) ; the pixmap height,
(NoColors 2) ; the number of colors
(cpp 1) ; the number of characters per pixel
(file "m.xpm")
)
with-open-file (
( st file
:direction :output
:if-exists :overwrite
:if-does-not-exist :create
)
; write XPM file header to the file
(format st "/* XPM */~%static char *a[] = {~%")
(format st "\"~a ~a ~a ~a\",~%" iWidth iHeight NoColors cpp)
; write color table to file
(format st "* c #000000~%") ;
(format st ". c #ffffff~%") ;
; write strings containing line of pixel's colors
(format st ".**.~%")
(format st ".**.~%")
(format st ".**.~%")
(format st ".**.~%")
; write end of the file
(format st "};~%") ; ~% is a new line
) ; with-open-file
(format t "file was created " file) ; t is a standard output
) ; defun write_To_XPM_File
;================ end of code ====================
it looks good to me (:-) but :
SYSTEM::%EXPAND-FORM: #1=(ST FILE :DIRECTION :OUTPUT :IF-EXISTS
:OVERWRITE :IF-DOES-NOT-EXIST :CREATE) should be a lambda expression
I can't find error.
Can you find it ?
Cheers,
Adam