'개소리 왈왈' 카테고리의 다른 글
| 슈니볼 (2) | 2013.04.29 |
|---|---|
| 어제의 멘붕 ㅋㅋㅋ (0) | 2013.04.27 |
| 구글 번역 ㅋㅋㅋ 앜ㅋㅋㅋ (0) | 2012.12.16 |
| 잉여로운 주말 (0) | 2012.12.09 |
| 멘붕 리커버 / 성격개조 모드 (0) | 2012.11.05 |
| 슈니볼 (2) | 2013.04.29 |
|---|---|
| 어제의 멘붕 ㅋㅋㅋ (0) | 2013.04.27 |
| 구글 번역 ㅋㅋㅋ 앜ㅋㅋㅋ (0) | 2012.12.16 |
| 잉여로운 주말 (0) | 2012.12.09 |
| 멘붕 리커버 / 성격개조 모드 (0) | 2012.11.05 |
| 종북사이트에서 활동중인 구차니입니다! (4) | 2013.01.29 |
|---|---|
| ㅋㅋㅋㅋㅋ 시발 ㅋㅋㅋㅋㅋ (2) | 2013.01.21 |
| 중선관위 개표 시연회? (0) | 2013.01.17 |
| wkw광명체 광명납작체? (14) | 2013.01.15 |
| 새해 버프 타임오버? (2) | 2013.01.04 |
| 내일 울산... ㅠ.ㅠ (0) | 2013.01.26 |
|---|---|
| ytn 아나운서의 난해한 패션 (2) | 2013.01.25 |
| 2013년 새해가 밝았구나 (4) | 2013.01.01 |
| 2013년 할일 (2) | 2012.12.31 |
| 해를 마무리 하며 (0) | 2012.12.30 |
| 선관위 측은 이에 대해 "만약에 선관위가 부정한 의도로 지시를 했다면 그런 증언이 있었을 것"이라며 "(투표지)보관은 잘 돼있다. 원래 투표종료 한 달 후에는 절차를 거쳐 폐기하지만 그 절차를 생략하고 보관하고 있겠다. 우리도 투표지를 보여드릴 기회가 있으면 좋겠다"고 말했다. [링크 : http://media.daum.net/politics/others/newsview?newsid=20130117180211461] |
| ㅋㅋㅋㅋㅋ 시발 ㅋㅋㅋㅋㅋ (2) | 2013.01.21 |
|---|---|
| 피곤하다.. (2) | 2013.01.18 |
| wkw광명체 광명납작체? (14) | 2013.01.15 |
| 새해 버프 타임오버? (2) | 2013.01.04 |
| 도대체 왜 이렇게 미친듯이 오를까? (2) | 2013.01.02 |
| 2> (mod 5 2)
1
2> (mod 5 -2)
-1
2> (rem 5 2)
1
2> (rem 5 -2)
1 |
Rem(x, 5):
5+ o o
| / /
| / /
| / /
| / /
*---------*---------*---------*---------*
-10 / -5 / 0 5 10
/ / |
/ / |
/ / |
o o -5+
Mod(x, 5):
o 5o o o
/ / | / /
/ / | / /
/ / | / /
/ / | / /
*---------*---------*---------*---------*
-10 -5 0 5 10
Rem(x, -5):
5+ o o
| / /
| / /
| / /
| / /
*---------*---------*---------*---------*
-10 / -5 / 0 5 10
/ / |
/ / |
/ / |
o o -5+
Mod(x, -5):
*---------*---------*---------*---------*
-10 / -5 / 0 / 5 /10
/ / | / /
/ / | / /
/ / | / /
o o -5o o[링크 : http://mathforum.org/library/drmath/view/54377.html] |
| xlisp에서 incf 오류 (0) | 2013.01.19 |
|---|---|
| lisp backquote / 유사인용 (0) | 2013.01.19 |
| lisp i/o (0) | 2013.01.17 |
| lisp file i/o (0) | 2013.01.17 |
| lisp savefun / load (0) | 2013.01.16 |
| read an expression
(read [<stream> [<eofp> [<eof> [<rflag>]]]])
print an expression on a new line
(print <expr> [<stream>])
print an expression
(prin1 <expr> [<stream>])
print an expression without quoting
(princ <expr> [<stream>])
pretty print an expression
(pprint <expr> [<stream>])
print to a string
(prin1-to-string <expr>)
(princ-to-string <expr>) |
| > (print "test string")
"test string"
"test string"
> (print '(test string))
(test string)
(test string) > (princ "test string")
test string
"test string"
> (princ '(test string))
(test string)
(test string)
"test string"
"test string"
> (prin1 '(test string)) (test string)
(test string)
|
| lisp backquote / 유사인용 (0) | 2013.01.19 |
|---|---|
| lisp rem, mod (0) | 2013.01.17 |
| lisp file i/o (0) | 2013.01.17 |
| lisp savefun / load (0) | 2013.01.16 |
| xlisp (0) | 2013.01.16 |
| > (setq out-stream (open "my-temp-file"))
error: file does not exist - "my-temp-file"
1> (setq out-stream (open "my-temp-file" :direction :output))
#<Character-Output-Stream 4:"my-temp-file">
1> (close out-stream)
t
1> (setq out-stream (open "my-temp-file"))
#<Character-Input-Stream 4:"my-temp-file">
1> (close out-stream)
t
1> [링크 : http://psg.com/~dlamkins/sl/chapter03-11.html] |
| open a file stream
(open <fname> &key :direction :element-type :if-exists :if-does-not-exist)
close a file stream
(close <stream>)
check for existance of a file
(probe-file <fname>)
delete a file
(delete-file <fname>)
get length of file
(file-length <stream>)
get or set file position
(file-position <stream> [<expr>])
read a byte from a stream
(read-byte <stream>[<eofp>[<eof>]])
write a byte to a stream
(write-byte <byte> <stream>)
|
| lisp rem, mod (0) | 2013.01.17 |
|---|---|
| lisp i/o (0) | 2013.01.17 |
| lisp savefun / load (0) | 2013.01.16 |
| xlisp (0) | 2013.01.16 |
| lisp 연관리스트 (0) | 2013.01.14 |
| load a source file
(load <fname> &key :verbose :print)
An implicit errset exists in this function so that if error occurs during loading, and *breakenable* is NIL, then the error message will be printed and NIL will be returned. The OS environmental variable XLPATH is used as a search path for files in this function. If the filename does not contain path separators ('/' for UNIX, and either '/' or '\' for MS-DOS) and XLPATH is defined, then each pathname in XLPATH is tried in turn until a matching file is found. If no file is found, then one last attempt is made in the current directory. The pathnames are separated by either a space or semicolon, and a trailing path separator character is optional.
<fname> the filename string, symbol, or a file stream created with open. The extension "lsp" is assumed.
:verbose the verbose flag (default is T)
:print the print flag (default is NIL)
returns T if successful, else NIL |
| save function to a file
(savefun <fcn>)
defined in init.lsp
<fcn> function name (saves it to file of same name, with extension ".lsp")
returns T if successful |
| > (defun add (a b) (+ a b))
add
> (savefun add)
"ADD.lsp"
|
| > (load "add")
; loading "add.lsp"
t
> (add 2 3)
5
> #'add
#<Closure-ADD: #9b92b0> |
| lisp i/o (0) | 2013.01.17 |
|---|---|
| lisp file i/o (0) | 2013.01.17 |
| xlisp (0) | 2013.01.16 |
| lisp 연관리스트 (0) | 2013.01.14 |
| lisp의 con cell 과 NIL (0) | 2013.01.14 |
| XLISP then issues the following prompt (unless standard input has been redirected):
>
This indicates that XLISP is waiting for an expression to be typed. If the current package is other than user, the the package name is printed before the ">".
When a complete expression has been entered, XLISP attempts to evaluate that expression. If the expression evaluates successfully, XLISP prints the result and then returns for another expression.
The following control characters can be used while XLISP is waiting for input:
Backspace delete last character
Del delete last character
tab tabs over (treated as space by XLISP reader)
ctrl-C goto top level
ctrl-G cleanup and return one level
ctrl-Z end of file (returns one level or exits program)
ctrl-P proceed (continue)
ctrl-T print information |
| > (_)
error: unbound function - _
if continued: try evaluating symbol again
1> ctrl-P
[ continue from break loop ]
error: unbound function - _
if continued: try evaluating symbol again
1> ctrl-T
[ Free: 7422, Total: 152117, GC calls: 2,
Edepth: 31183, Adepth 41579, Sdepth: 999588 ]
ctrl-G
[ back to previous break level ]
> |
| > (_)
error: unbound function - _
if continued: try evaluating symbol again
1> ctrl-C
[ back to top level ]
> |
| lisp file i/o (0) | 2013.01.17 |
|---|---|
| lisp savefun / load (0) | 2013.01.16 |
| lisp 연관리스트 (0) | 2013.01.14 |
| lisp의 con cell 과 NIL (0) | 2013.01.14 |
| lisp # (0) | 2013.01.11 |
| 피곤하다.. (2) | 2013.01.18 |
|---|---|
| 중선관위 개표 시연회? (0) | 2013.01.17 |
| 새해 버프 타임오버? (2) | 2013.01.04 |
| 도대체 왜 이렇게 미친듯이 오를까? (2) | 2013.01.02 |
| 이것도 음모론이라고 하려나? (0) | 2012.12.27 |