lisp2arx
Visual Programming for AutoLisp Mathématiques en programmation Lisp.. doc2cpp,doc2lsp, sld2lsp, bmp2dcl, free__GifCcapture for all-CAD'platforms..
Lista Forumurilor Pe Tematici
lisp2arx | Reguli | Inregistrare | Login

POZE LISP2ARX

Nu sunteti logat.
Nou pe simpatie:
ro_xy20
Femeie
24 ani
Bucuresti
cauta Barbat
24 - 45 ani
lisp2arx / Listof AutoLisp.100 / vla-AutoLispR14- ac_setq set variabile let*safecall Moderat de zauchan
Autor
Mesaj Pagini: 1
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 508


Code:

(defun let-e (a b / f)
 (eval (list 'defun 'f (mapcar 'car a) b))
 (eval (cons f (mapcar 'cadr a)))
)
;;Bya=ElpanovEvgeniy
(defun let-e1 (a b)
 (eval (cons (eval (list 'lambda (mapcar 'car a) b)) (mapcar 'cadr a)))
)

(let-e '((x 3)) '(+ x (* x 10)))
;;==> 33

(setq x 5)
(+ (let-e '((x 3)) '(+ x (* x 10))) x)
;;==> 38

(setq x 2 y 4)
(let-e '((x 3) (y (+ x 2))) '(* x y))
;;==> 12


Comvert list of Variabile to Strings

Code:

_$ (setq lst '(A B C ))
(A B C)
_$ (mapcar 'vl-prin1-to-string lst)
("A" "B" "C")



Code:

(mapcar 'set '(a b c d) '(1 2 3 4))(set (read "ab") 1)
(setq i 1)
(repeat 4 (princ (eval (read (strcat "SYM" (itoa i)))))    (setq i (1+ i ))(princ "\n")

Is it possible to run a loop where I setq concatenated symbol names? Basically, loop through to (setq sym1 [expr]), (setq sym2 [expr]), (setq sym3 [expr])

Code:

Command: (setq q3 (list (list 'a 'b 'c) (princ "A1=") (princ 'a)))
A1=A((A B C) "A1=" A)

Command: (q3 1)
; error: too few arguments

Command: (q3 1 2 3)
1

The programming Language AutoLisp, have too many problem/s.
No exists anymore Jobs with Visual-Lisp because the *.VLx, this format do not  keep the original-copyright/s of author/s.
-----------
Even , other programmers steal the source.lisp (idem C# or Java)
then the original=author is not preserved.?
(e.g The russian hacker or Chinese can decompile  C# or Delphi Bds)
:whistling:
The big-big-problem inside eMarket for programming Languages, these can not
blocked the "original-Author inside .Fas".
:idea: The eMarket= eBay or Amazon.com

Code:

;;Set C with default value if missing
(setq q3 (list (list 'a 'b 'c) (princ "A1=") (princ 'a)))
Command: (setq q3 (subst (list 'a 'b) (car q3) q3))
((A B) "A1=" A)

Command: (q3 1 2 3)
; error: too many arguments

Command: (q3 1 2)
1
Command: (setq a1 '(a b / c))
(A B / C)

(setq q5 (list (list 'a 'b '/ 'c) (princ "A1=") (princ 'a)))

Command: (setq q5 (list (list 'a 'b '/ 'c) (princ "A1=") (princ 'a)))
A1=A((A B / C) "A1=" A)

Command: (q5 1 2)
1

Command: (q5 1 2 3)
; error: too many arguments

Command: (setq [ 1)
1

Command: (princ [)
11

(Defun  Illegal-Variable-Names( / $rr)
(Alert "I guess I never studied this before (in 40 years), but I stumbled on AutoLisp disliking a variable named "

Code:

(SNvalid sym_name [flag]) 

Command: (snvalid "hocus-pocus")
T

Command: (snvalid "hocus pocus")
T

Command: (snvalid "hocus%pocus")
T

The following examples assume EXTNAMES is set to 0:

Command: (snvalid "hocus-pocus")
T

Command: (snvalid "hocus pocus")
nil

Command: (snvalid "hocus%pocus")
nil

The following example includes a vertical bar in the symbol table name:
Command: (snvalid "hocus|pocus")
nil



Code:

(defun Setf (listvar  / $rr item)
 (foreach item listvar
          (set (read (car item)) (cadr item)))
)
(setq n 10 winhelp "You need more import CommonLisp inside VLide?")
(Setq declare (list  (list "mmax" 0) (list "j" 0)
      (list "ipow" (expt n 2))
      (list "pow" 0) (list "wtemp" 0.0) (list "wr" 0.0) (list "wpr" 0.0) 
      (list "prev" 0) (list "wpi" 0.0) (list "wi" 0.0) (list "theta" 0.0)
      (list "tempr" 0.0) (list "tempi" 0.0) (list "wrs" 0.0) (list "wis" 0.0)))
(setf declare)



_______________________________________


pus acum 3 ani
   
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 508
Eu aici cum transform un stdcall to safecall.
Eu pot apela functiile cu operator
princ~1()
getstring(~1"xxxxxxx"

Code:

(setq sel-ent (entsel))
(setq sel-pto (vl-catch-all-apply 
                       'vlax-curve-getclosestpointtoprojection
                       (list (vlax-ename->vla-object (car sel-ent)) 
                             (cadr sel-ent)
                             (getvar "viewdir"))))
(mapcar 'set '(a1 a2 vec) '(0 1. (11 1.0 0.0 0.0)))



ac_setq set variabile aici cum transform stdcall pot apela functiile operator sel-ent sel-pto (list

57.8KB


_______________________________________


pus acum 2 ani
   
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 508
Excerpt from Acad 2013 'AutoLISP Developer's Guide' (the last pdf version) pp. 10

Symbols and Variables
AutoLISP uses symbols to refer to data. Symbol names are not case sensitive
and may consist of any sequence of alphanumeric and notation characters,
except the following:
Characters restricted from symbol names
( (Open Parenthesis)
) (Close Parenthesis)
. (Period)
' (Apostrophe)
" (Quote Symbol)
; (Semicolon)
A symbol name cannot consist only of numeric characters


_______________________________________


pus acum 1 an
   
Pagini: 1  

Mergi la