HCoop
/
clinton
/
parenscript.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4a987e2
)
Updated reference.lisp to reflect recent changes.
author
Vladimir Sedach
<vsedach@gmail.com>
Sun, 12 Aug 2007 01:22:42 +0000
(
01:22
+0000)
committer
Vladimir Sedach
<vsedach@gmail.com>
Sun, 12 Aug 2007 01:22:42 +0000
(
01:22
+0000)
docs/reference.lisp
patch
|
blob
|
blame
|
history
diff --git
a/docs/reference.lisp
b/docs/reference.lisp
index
d7219f5
..
c063d43
100644
(file)
--- a/
docs/reference.lisp
+++ b/
docs/reference.lisp
@@
-383,16
+383,11
@@
a-variable => aVariable
(* 1 (+ 2 3 4) 4 (/ 6 7))
=> 1 * (2 + 3 + 4) * 4 * (6 / 7)
(* 1 (+ 2 3 4) 4 (/ 6 7))
=> 1 * (2 + 3 + 4) * 4 * (6 / 7)
-;;; The pre
/post
increment and decrement operators are also
+;;; The pre increment and decrement operators are also
;;; available. `INCF' and `DECF' are the pre-incrementing and
;;; available. `INCF' and `DECF' are the pre-incrementing and
-;;; pre-decrementing operators, and `++' and `--' are the
-;;; post-decrementing version of the operators. These operators can
+;;; pre-decrementing operators. These operators can
;;; take only one argument.
;;; take only one argument.
-(++ i) => i++
-
-(-- i) => i--
-
(incf i) => ++i
(decf i) => --i
(incf i) => ++i
(decf i) => --i
@@
-728,19
+723,16
@@
a-variable => aVariable
;;; The `DOLIST' form is a shortcut for iterating over an array. Note
;;; that this form creates temporary variables using a function called
;;; The `DOLIST' form is a shortcut for iterating over an array. Note
;;; that this form creates temporary variables using a function called
-;;; `
J
S-GENSYM', which is similar to its Lisp counterpart `GENSYM'.
+;;; `
P
S-GENSYM', which is similar to its Lisp counterpart `GENSYM'.
(dolist (l blorg)
(document.write (+ "L is " l)))
(dolist (l blorg)
(document.write (+ "L is " l)))
- => {
- var tmpArr1 = blorg;
+ => var tmpArr1 = blorg;
for (var tmpI2 = 0; tmpI2 < tmpArr1.length;
tmpI2 = tmpI2 + 1) {
var l = tmpArr1[tmpI2];
document.write('L is ' + l);
};
for (var tmpI2 = 0; tmpI2 < tmpArr1.length;
tmpI2 = tmpI2 + 1) {
var l = tmpArr1[tmpI2];
document.write('L is ' + l);
};
- }
-
;;; The `DOEACH' form is converted to a `for (var .. in ..)' form in
;;; JavaScript. It is used to iterate over the enumerable properties
;;; The `DOEACH' form is converted to a `for (var .. in ..)' form in
;;; JavaScript. It is used to iterate over the enumerable properties
@@
-890,7
+882,7
@@
a-variable => aVariable
(document.write
(html ((:a :href "#"
(document.write
(html ((:a :href "#"
- :onclick (
j
s-inline (transport))) "link")))
+ :onclick (
p
s-inline (transport))) "link")))
=> document.write
('<a href=\"#\" onclick=\"' + 'javascript:transport();' + '\">link</a>')
=> document.write
('<a href=\"#\" onclick=\"' + 'javascript:transport();' + '\">link</a>')
@@
-902,14
+894,12
@@
a-variable => aVariable
(setf element.inner-h-t-m-l
(html ((:textarea (or disabled (not authorized)) :disabled "disabled")
"Edit me"))))
(setf element.inner-h-t-m-l
(html ((:textarea (or disabled (not authorized)) :disabled "disabled")
"Edit me"))))
- => {
- var disabled = null;
+ => var disabled = null;
var authorized = true;
element.innerHTML =
'<textarea'
+ (disabled || !authorized ? ' disabled=\"' + 'disabled' + '\"' : '')
+ '>Edit me</textarea>';
var authorized = true;
element.innerHTML =
'<textarea'
+ (disabled || !authorized ? ' disabled=\"' + 'disabled' + '\"' : '')
+ '>Edit me</textarea>';
- }
; (CSS-INLINE css-expression)
; (CSS-INLINE css-expression)
@@
-965,13
+955,13
@@
a-variable => aVariable
;;; of the `DOLIST' form (note how `JS-GENSYM', the ParenScript of
;;; `GENSYM', is used to generate new ParenScript variable names):
;;; of the `DOLIST' form (note how `JS-GENSYM', the ParenScript of
;;; `GENSYM', is used to generate new ParenScript variable names):
-(def
j
smacro dolist (i-array &rest body)
+(def
p
smacro dolist (i-array &rest body)
(let ((var (first i-array))
(array (second i-array))
(arrvar (js-gensym "arr"))
(idx (js-gensym "i")))
`(let ((,arrvar ,array))
(let ((var (first i-array))
(array (second i-array))
(arrvar (js-gensym "arr"))
(idx (js-gensym "i")))
`(let ((,arrvar ,array))
- (do ((,idx 0 (
++
,idx)))
+ (do ((,idx 0 (
incf
,idx)))
((>= ,idx (slot-value ,arrvar 'length)))
(let ((,var (aref ,arrvar ,idx)))
,@body)))))
((>= ,idx (slot-value ,arrvar 'length)))
(let ((,var (aref ,arrvar ,idx)))
,@body)))))