Scheme 5 v RICHARD KELSEY, WILLIAM CLINGER, AND JONATHAN REES () H. ABELSON R. K. DYBVIG C. T. HAYNES G. J. ROZAS N. I. ADAMS IV D. P. FRIEDMAN

Size: px
Start display at page:

Download "Scheme 5 v RICHARD KELSEY, WILLIAM CLINGER, AND JONATHAN REES () H. ABELSON R. K. DYBVIG C. T. HAYNES G. J. ROZAS N. I. ADAMS IV D. P. FRIEDMAN"

Transcription

1 Scheme 5 v (FP) Guy Lewis Steele David Madore Scheme R 5 RS Scheme wangyg@contextfree.net Scheme 9 R 5 RS 1999 Hisao Suzuki ( euske/doc/r5rs-ja/index.html) 2000 Dai Inukai ( iwao/scheme/r5rsj/html/r5rsj toc.html) v v v v v v0.9.0

2 Scheme 5 v RICHARD KELSEY, WILLIAM CLINGER, AND JONATHAN REES () H. ABELSON R. K. DYBVIG C. T. HAYNES G. J. ROZAS N. I. ADAMS IV D. P. FRIEDMAN E. KOHLBECKER G. L. STEELE JR. D. H. BARTLEY R. HALSTEAD D. OXLEY G. J. SUSSMAN G. BROOKS C. HANSON K. M. PITMAN M. WAND Robert Hieb Scheme Scheme Lisp Guy Lewis Steele Jr. Gerald Jay Sussman Scheme Scheme Scheme Scheme Scheme / 7 BNF Scheme Scheme Scheme

3 3 Scheme Scheme lambda Lisp Scheme lambda Scheme goto Scheme (Escape ) Scheme Common Lisp Scheme (Hygienic macro) Miller Jim Philbin John Ramsdell Mike Shaff Jonathan Shapiro Julie Sussman Perry Wagle Daniel Weise Henry Wu Ozan Yigit Carol Fessenden Daniel Friedman Christopher Haynes Scheme Texas Instruments TI Scheme [30] MIT Scheme[17] T[22] Scheme 84[11] Common Lisp[27] Algol 60[18] Betty Dexter TEX Donald Knuth Betty MIT Indiana Oregon NEC (ARPA) N C-0505 MIT (NSF) NCS NCS Indiana Scheme 1975 [28] 1978 [25] MIT [26] Scheme MIT Yale Indiana [21, 17, 10] Scheme 1984 [1] Scheme Scheme Scheme [4] 1985 MIT Indiana 1986 [23] 1988 [6] Xerox PARC Scheme Scheme Alan Bawden Michael Blair George Carrette Andy Cromarty Pavel Curtis Jeff Dalton Olivier Danvy Ken Dickey Bruce Duba Marc Feeley Andy Freeman Richard Gabriel Yekta Gürsel Ken Haase Robert Hieb Paul Hudak Morry Katz Chris Lindblad Mark Meyer Jim

4 4 Scheme 5 SCHEME 1. Scheme 1.1. Scheme Scheme Algol Scheme Scheme APL Snobol Lisp Algol 60 Pascal C Scheme (Continuation) (Extent) Scheme Scheme APL Lisp Scheme 3.5 Scheme Common Lisp ML Scheme Scheme (Non-local exits) (Backtracking) (Coroutine) 6.4 Scheme ML C APL Haskell (Lazy-evaluation) Algol 60 (Call-by-name) Haskell Algol 60 Scheme Scheme Scheme Scheme Common Lisp 1.2. Lisp Scheme Scheme Scheme Scheme eval Scheme read read Scheme Scheme (optional) Scheme Scheme Scheme Scheme (library) Scheme Scheme Scheme Scheme Scheme Scheme Scheme Scheme (Unspecified) Scheme

5 template template category qualifier category qualifier library optional category syntax (template) expression variable expression thing 1... thing thing 1 thing 2... thing category (vector-ref vector k) vector-ref vector k (make-vector k) (make-vector k fill) make-vector 3.2 vector-ref vector-ref obj list, list 1,... list j, z, z 1,... z j,... x, x 1,... x j,... y, y 1,... y j,... q, q 1,... q j,... n, n 1,... n j,... k, k 1,... k j, = (* 5 8) = 40 (* 5 8) 40 (* 5 8) ? (Predicate) 3.4! (Mutation ) -> list->vector 2. Scheme Scheme 7.1 Scheme Foo FOO #x1ab #X1ab 2.1. Scheme Scheme Scheme lambda q list->vector soup + V17a <=? a34ktmns the-word-recursion-has-many-meanings! $ % & * + -. / : < = ^ _ ~ Scheme

6 6 Scheme symbol (Whitespace) Scheme Token ) (;) Scheme ;;; The FACT computes the factorial ;;; of a non-negative integer. (define fact (lambda (n) (if (= n 0) 1 ;Base case: return 1 (* n (fact (- n 1)))))) Pair ( ) ` " \ [ ] { } # #t #f #\ #( ) #e #i #b #o #d #x lambda lambda let let* letrec do Scheme Algol Pascal Common Lisp Lisp lambda lambda boolean? symbol? char? vector?? pair? number? string? port?

7 3. 7 (boolean) (pair) (symbol) (number) (char character) (string) (vector) (port) () Scheme #f #f Scheme #f 3.3. Scheme Lisp (8 13) 28 #e #x1c ( ) (8. (13. ())) Scheme quote read write / (+ 2 6) Scheme Scheme string-set! car vector-ref string-ref eqv? 6.1 symbol->string 3.5. Scheme Scheme call-with-current-continuation [8] Steele Sussman Scheme Scheme (Actor) Steele Sussman (Tail context) lambda lambda tail expression (lambda formals definition * expression * tail expression )

8 8 Scheme 5 tail expression 7 expression tail expression (if expression tail expression tail expression ) (if expression tail expression ) (cond cond clause + ) (cond cond clause * (else tail sequence )) (case expression case clause + ) (case expression case clause * (else tail sequence )) (and expression * tail expression ) (or expression * tail expression ) (let ( binding spec *) tail body ) (let variable ( binding spec *) tail body ) (let* ( binding spec *) tail body ) (letrec ( binding spec *) tail body ) (let-syntax ( syntax spec *) tail body ) (letrec-syntax ( syntax spec *) tail body ) (begin tail sequence ) (do ( iteration spec *) ( test tail sequence ) expression *) cond clause ( test tail sequence ) case clause (( datum *) tail sequence ) tail body definition * tail sequence tail sequence expression * tail expression cond ( expression 1 => expression 2 ), expression 2 expression 2 apply call-with-current-continuation call-with-values eval eval f g h x (lambda () (if (g) (let ((x (h))) x) (and (g) (f)))) Scheme h let h h let 4. quasiquote variable syntax 3.1 (define x 28) x = (quote datum ) datum constant syntax syntax syntax (quote datum ) datum datum Scheme 3.3 Scheme (quote a) = a (quote #(a b c)) = #(a b c) (quote (+ 1 2)) = (+ 1 2) (quote datum ) datum

9 4. 9 a = a #(a b c) = #(a b c) () = () (+ 1 2) = (+ 1 2) (quote a) = (quote a) a = (quote a) "abc" = "abc" "abc" = "abc" = = #t = #t #t = #t 3.4 set-car! string-set! ( operator operand 1... ) syntax Scheme (+ 3 4) = 7 ((if #f + *) 3 4) = 12 + * lambda values values apply (Combinations) Lisp Scheme Lisp () Scheme () (lambda formals body ) syntax formals body lambda lambda lambda lambda body body (lambda (x) (+ x x)) = ((lambda (x) (+ x x)) 4) = 8 (define reverse-subtract (lambda (x y) (- y x))) (reverse-subtract 7 10) = 3 (define add4 (let ((x 4)) (lambda (y) (+ x y)))) (add4 6) = 10 formals ( variable 1... ): variable : variable ( variable 1... variable n. variable n+1 ): n n formals variable ((lambda x x) ) = ( ) ((lambda (x y. z) z) ) = (5 6) lambda eqv? eq? 6.1

10 10 Scheme (if test consequent alternate ) (if test consequent ) syntax syntax test consequent alternate if test consequent alternate test alternate (if (> 3 2) yes no) = yes (if (> 2 3) yes no) = no (if (> 3 2) (- 3 2) (+ 3 2)) = (set! variable expression ) syntax expression variable variable set! set! (define x 2) (+ x 1) = 3 (set! x 4) = (+ x 1) = (cond clause 1 clause 2... ) clause ( test expression 1... ) library syntax test clause ( test => expression ) clause else (else expression 1 expression 2... ). cond clause test test clause expression clause expression cond clause test expression test clause => expression expression test cond test else else expression expression (cond ((> 3 2) greater) ((< 3 2) less)) = greater (cond ((> 3 3) greater) ((< 3 3) less) (else equal)) = equal (cond ((assv b ((a 1) (b 2))) => cadr) (else #f)) = 2 (case key clause 1 clause 2... ) library syntax key clause (( datum 1... ) expression 1 expression 2... ), datum datum clause else (else expression 1 expression 2... ). case key datum key eqv? 6.1 datum clause clause case key datum else case case (case (* 2 3) (( ) prime) (( ) composite)) = composite (case (car (c d)) ((a) a) ((b) b)) = (case (car (c d)) ((a e i o u) vowel) ((w y) semivowel) (else consonant)) = consonant

11 4. 11 (and test 1... ) library syntax test #t (and (= 2 2) (> 2 1)) = #t (and (= 2 2) (< 2 1)) = #f (and 1 2 c (f g)) = (f g) (and) = #t (or test 1... ) library syntax test #f (or (= 2 2) (> 2 1)) = #t (or (= 2 2) (< 2 1)) = #t (or #f #f #f) = #f (or (memq b (a b c)) (/ 3 0)) = (b c) let let* letrec Scheme Algol 60 let let* letrec (Mutually recursive) (let bindings body ) bindings (( variable 1 init 1 )... ), library syntax init body variable init variable init body body variable body (let ((x 2) (y 3)) (* x y)) = 6 (let ((x 2) (y 3)) (let ((x 7) (z (+ x y))) (* z x))) = 35 let (let* bindings body ) bindings (( variable 1 init 1 )... ), body library syntax let* let ( variable init ) let* (let ((x 2) (y 3)) (let* ((x 7) (z (+ x y))) (* z x))) = 70 (letrec bindings body ) bindings (( variable 1 init 1 )... ), library syntax body variable variable init init variable body body variable letrec (letrec ((even? (lambda (n) (if (zero? n) #t (odd? (- n 1))))) (odd? (lambda (n) (if (zero? n) #f (even? (- n 1)))))) (even? 88)) = #t letrec variable init Scheme letrec init lambda

12 12 Scheme (begin expression 1 expression 2... ) library syntax expression expression (Side effect) (define x 0) (begin (set! x 5) (+ x 1)) = 6 (begin (display "4 plus 1 equals ") (display (+ 4 1))) = 4 plus 1 equals (do (( variable 1 init 1 step 1 )... ) ( test expression... ) command... ) library syntax do expression do init variable init variable test command step variable step variable test expression expression expression do variable init do do variable step ( variable init ) ( variable init variable ) (do ((vec (make-vector 5)) (i 0 (+ i 1))) ((= i 5) vec) (vector-set! vec i i)) = #( ) (let ((x ( ))) (do ((x x (cdr x)) (sum 0 (+ sum (car x)))) ((null? x) sum))) = 25 (let variable bindings body ) library syntax let let do let body variable body variable body (let loop ((numbers ( )) (nonneg ()) (neg ())) (cond ((null? numbers) (list nonneg neg)) ((>= (car numbers) 0) (loop (cdr numbers) (cons (car numbers) nonneg) neg)) ((< (car numbers) 0) (loop (cdr numbers) nonneg (cons (car numbers) neg))))) = ((6 1 3) (-5-2)) (delay expression ) library syntax delay force (Call by need) (delay expression ) (Promise) force expression expression force 6.4 delay (quasiquote qq template ) ` qq template syntax syntax (Backquote) (Quasiquote) qq template ` qq template qq template qq template qq template `(list,(+ 1 2) 4) = (list 3 4) (let ((name a)) `(list,name,name)) = (list a (quote a)) `(a,(+ 1 2),@(map abs (4-5 6)) b) = (a b) `(( foo,(- 10 3)),@(cdr (c)).,(car (cons)))

13 4. 13 = ((foo 7). cons) `#(10 5,(sqrt 4),@(map sqrt (16 9)) 8) = #( ) `(a `(b,(+ 1 2),(foo,(+ 1 3) d) e) f) = (a `(b,(+ 1 2),(foo 4 d) e) f) (let ((name1 x) (name2 y)) `(a `(b,,name1,,name2 d) e)) = (a `(b,x, y d) e) ` qq template (quasiquote qq template ), expression (unquote expression ),@ expression (unquote-splicing expression ) write Scheme (quasiquote (list (unquote (+ 1 2)) 4)) = (list 3 4) (quasiquote (list (unquote (+ 1 2)) 4)) = `(list,(+ 1 2) 4) (quasiquote (list (unquote (+ 1 2)) 4)) qq template quasiquote unquote unquote-splicing 4.3. Scheme (Macros) ( keyword datum...) keyword datum (Use) (Transformer) Scheme [14, 15, 2, 7, 9] define Let-syntax letrec-syntax let letrec 5.3 (let-syntax bindings body ) bindings (( keyword transformer spec )... ) syntax keyword transformer spec syntax-rules body keyword let-syntax keyword body keyword body (let-syntax ((when (syntax-rules () ((when test stmt1 stmt2...) (if test (begin stmt1 stmt2...)))))) (let ((if #t)) (when if (set! if now)) if)) = now (let ((x outer)) (let-syntax ((m (syntax-rules () ((m) x)))) (let ((x inner)) (m)))) = outer (letrec-syntax bindings body ) let-syntax syntax letrec-syntax keyword body keyword bindings body letrec-syntax (letrec-syntax ((my-or (syntax-rules () ((my-or) #f)

14 14 Scheme 5 ((my-or e) e) ((my-or e1 e2...) (let ((temp e1)) (if temp temp (my-or e2...))))))) (let ((x #f) (y 7) (temp 8) (let odd?) (if even?)) (my-or x (let temp) (if y) y))) = transformer spec (syntax-rules literals syntax rule... ) literals syntax rule ( pattern template ) syntax rule pattern pattern pattern ( pattern...) ( pattern pattern.... pattern ) ( pattern... pattern ellipsis ) #( pattern...) #( pattern... pattern ellipsis ) template ( element...) ( element element.... template ) #( element...) element ellipsis template ellipsis... syntax-rules syntax-rules syntax rule syntax rule literals... syntax rule pattern syntax rule (Literal identifier) let-syntax letrec-syntax literals (Subform)... (Subpattern) literals F P P P F P (P 1... P n ) F n P 1 P n P (P 1 P 2... P n. P n+1 ) F n P 1 P n F n cdr P n+1 P (P 1... P n P n+1 ellipsis ) ellipsis... F n F n P 1 P n F P n+1 P #(P 1... P n ) F n P 1 P n P #(P 1... P n P n+1 ellipsis ) ellipsis... F n F n P 1 P n F P n+1 P (Datum) equal? F P syntax rule (Subtemplate)

15 syntax-rules 7.3 let cond (let ((=> #f)) (cond (#t => ok))) = ok cond => => => (let ((=> #f)) (if #t (begin => ok))) (let ((=> #f)) (let ((temp #t)) (if temp ( ok temp)))) Scheme 4 Scheme Scheme (begin form 1... ) begin 5.2. program body (define variable expression ) (define ( variable formals ) body ) formals lambda (define variable (lambda ( formals ) body )) (define ( variable. formal ) body ) formal (define variable (lambda formal body )) variable (define variable expression ) (set! variable expression ) variable variable set! (define add3 (lambda (x) (+ x 3))) (add3 3) = 6 (define first car) (first (1 2)) = 1 Scheme body lambda let let* letrec let-syntax letrec-syntax body body body variable body (let ((x 5)) (define foo (lambda (y) (bar x y))) (define bar (lambda (a b) (+ (* a b) a))) (foo (+ x 3))) = 45 body letrec let

16 16 Scheme 5 (let ((x 5)) (letrec ((foo (lambda (y) (bar x y))) (bar (lambda (a b) (+ (* a b) a)))) (foo (+ x 3)))) letrec body variable expression (begin definition 1... ) begin 5.3. program (define-syntax keyword transformer spec ) keyword transformer spec syntax-rules keyword define-syntax (define define 3) (begin (define begin list)) (let-syntax ((foo (syntax-rules () ((foo (proc args...) body...) (define proc (lambda (args...) body...)))))) (let ((x 3)) (foo (plus x y) (+ x y)) (define foo x) (plus foo x))) 6. Scheme Scheme abs Scheme 6.1. #t #f eq? equal? eqv? eq? (eqv? obj 1 obj 2 ) eqv? obj 1 obj 2 eqv? #t eqv? Scheme eqv? #t obj 1 obj 2 #t #f obj 1 obj 2 (string=? (symbol->string obj1) (symbol->string obj2)) = #t obj 1 obj (Uninterned symbol) eqv? obj 1 obj 2 = 6.2 obj 1 obj 2 char=? obj 1 obj 2 obj 1 obj obj 1 obj 2 (Location tag) eqv? #f obj 1 obj obj 1 obj 2 #t #f obj 1 obj 2

17 6. 17 (string=? (symbol->string obj 1) (symbol->string obj 2)) = #f obj 1 obj 2 obj 1 obj 2 = #f obj 1 obj 2 char=? #f obj 1 obj 2 obj 1 obj 2 obj 1 obj 2 (eqv? a a) = #t (eqv? a b) = #f (eqv? 2 2) = #t (eqv? () ()) = #t (eqv? ) = #t (eqv? (cons 1 2) (cons 1 2))= #f (eqv? (lambda () 1) (lambda () 2)) = #f (eqv? #f nil) = #f (let ((p (lambda (x) x))) (eqv? p p)) = #t eqv? eqv? (eqv? "" "") = (eqv? #() #()) = (eqv? (lambda (x) x) (lambda (x) x)) = (eqv? (lambda (x) x) (lambda (y) y)) = eqv? gen-counter gen-loser (define gen-counter (lambda () (let ((n 0)) (lambda () (set! n (+ n 1)) n)))) (let ((g (gen-counter))) (eqv? g g)) = #t (eqv? (gen-counter) (gen-counter)) = #f (define gen-loser (lambda () (let ((n 0)) (lambda () (set! n (+ n 1)) 27)))) (let ((g (gen-loser))) (eqv? g g)) = #t (eqv? (gen-loser) (gen-loser)) = (letrec ((f (lambda () (if (eqv? f g) both f))) (g (lambda () (if (eqv? f g) both g)))) (eqv? f g)) = (letrec ((f (lambda () (if (eqv? f g) f both))) (g (lambda () (if (eqv? f g) g both)))) (eqv? f g)) = #f Scheme eqv? (eqv? (a) (a)) = (eqv? "a" "a") = (eqv? (b) (cdr (a b))) = (let ((x (a))) (eqv? x x)) = #t eqv? Scheme Scheme (Bit pattern) (eq? obj 1 obj 2 ) eq? eqv? eq? eqv? eq? eqv? eq? eqv? eq? eqv? (eq? a a) = #t (eq? (a) (a)) = (eq? (list a) (list a)) = #f (eq? "a" "a") = (eq? "" "") = (eq? () ()) = #t (eq? 2 2) = (eq? #\A #\A) = (eq? car car) = #t (let ((n (+ 2 3))) (eq? n n)) = (let ((x (a))) (eq? x x)) = #t (let ((x #())) (eq? x x)) = #t (let ((p (lambda (x) x))) (eq? p p)) = #t

18 18 Scheme 5 eqv? eq? eq? eqv? eq? eq? eqv? eq? eqv? (equal? obj 1 obj 2 ) library equal? equal? eqv? equal? equal? (equal? a a) = #t (equal? (a) (a)) = #t (equal? (a (b) c) (a (b) c)) = #t (equal? "abc" "abc") = #t (equal? 2 2) = #t (equal? (make-vector 5 a) (make-vector 5 a)) = #t (equal? (lambda (x) x) (lambda (y) y)) = 6.2. Lisp Common Lisp MacLisp [20] Common Lisp Scheme Scheme Scheme number complex real rational integer Scheme fixnum flonum (number) (complex) (real) (rational) (integer) Scheme Scheme number? complex? real? rational? integer? Scheme 3 Scheme Scheme Scheme Scheme inexact->exact Scheme Scheme Scheme Scheme

19 6. 19 Scheme length vector-length string-length + - * quotient remainder modulo max min abs numerator denominator gcd lcm floor ceiling truncate round rationalize expt Scheme / Scheme IEEE [12] Scheme sqrt 4 2 sqrt Scheme Scheme #b #o #d #x #e #i # s f d l short single double long short single long double e Scheme double Scheme F0 single L0 long (number? obj ) (complex? obj ) (real? obj ) (rational? obj ) (integer? obj ) #t #f z (zero? (imag-part z)) (real? z) x (= x (round x)) (integer? x) (complex? 3+4i) = #t (complex? 3) = #t

20 20 Scheme 5 (real? 3) = #t (real? i) = #t (real? #e1e10) = #t (rational? 6/10) = #t (rational? 6/3) = #t (integer? 3+0i) = #t (integer? 3.0) = #t (integer? 8/4) = #t rational? real? complex? number? (exact? z) (inexact? z) Scheme (= z 1 z 2 z 3... ) (< x 1 x 2 x 3... ) (> x 1 x 2 x 3... ) (<= x 1 x 2 x 3... ) (>= x 1 x 2 x 3... ) #t Lisp = zero? min max (+ z 1... ) (* z 1... ) (+ 3 4) = 7 (+ 3) = 3 (+) = 0 (* 4) = 4 (*) = 1 (- z 1 z 2 ) (- z) (- z 1 z 2... ) optional (/ z 1 z 2 ) (/ z) (/ z 1 z 2... ) optional (- 3 4) = -1 ( ) = -6 (- 3) = -3 (/ 3 4 5) = 3/20 (/ 3) = 1/3 (abs x) abs (abs -7) = 7 library (zero? z) (positive? x) (negative? x) (odd? n) (even? n) library library library library library #t #f (max x 1 x 2... ) library (min x 1 x 2... ) library (max 3 4) = 4 ; (max 3.9 4) = 4.0 ; (quotient n 1 n 2 ) (remainder n 1 n 2 ) (modulo n 1 n 2 ) n 2 n 1 /n 2 (quotient n 1 n 2) = n 1/n 2 (remainder n 1 n 2) = 0 (modulo n 1 n 2) = 0 n 1 /n 2 (quotient n 1 n 2) = n q (remainder n 1 n 2) = n r (modulo n 1 n 2) = n m

21 6. 21 n q n 1 /n 2 0 < n r < n 2 0 < n m < n 2 n r n m n 1 n 2 n r n 1 n m n 2 n 1 n 2 n 2 0 (= n 1 (+ (* n 2 (quotient n 1 n 2)) (remainder n 1 n 2))) = #t (modulo 13 4) = 1 (remainder 13 4) = 1 (modulo -13 4) = 3 (remainder -13 4) = -1 (modulo 13-4) = -3 (remainder 13-4) = 1 round IEEE inexact->exact (floor -4.3) = -5.0 (ceiling -4.3) = -4.0 (truncate -4.3) = -4.0 (round -4.3) = -4.0 (floor 3.5) = 3.0 (ceiling 3.5) = 4.0 (truncate 3.5) = 3.0 (round 3.5) = 4.0 ; (round 7/2) = 4 ; (round 7) = 7 (modulo -13-4) = -1 (remainder -13-4) = -1 (rationalize x y) library (remainder ) = -1.0 ; (gcd n 1... ) library (lcm n 1... ) library (gcd 32-36) = 4 (gcd) = 0 (lcm 32-36) = 288 (lcm ) = ; (lcm) = 1 (numerator q) (denominator q) 0 1 (numerator (/ 6 4)) = 3 (denominator (/ 6 4)) = 2 (denominator (exact->inexact (/ 6 4))) = 2.0 (floor x) (ceiling x) (truncate x) (round x) floor x ceiling x truncate x x round x x rationalize x y (Simplest) r 1 = p 1 /q 1 r 2 = p 2 /q 2 p 1 p 2 q 1 q 2 r 1 r 2 3/5 4/7 2/7 3/5 2/5 2/7 3/5 0 = 0/1 (rationalize (inexact->exact.3) 1/10) = 1/3 ; (rationalize.3 1/10) = #i1/3 ; (exp z) (log z) (sin z) (cos z) (tan z) (asin z) (acos z) (atan z) (atan y x) log z 10 asin acos atan (sin 1 )(cos 1 )(tan 1 ) atan (angle (make-rectangular x y)) log z π π log 0 log sin 1 z cos 1 z tan 1 z

22 22 Scheme 5 sin 1 z = i log(iz + 1 z 2 ) cos 1 z = π/2 sin 1 z tan 1 z = (log(1 + iz) log(1 iz))/(2i) [27] [19] (sqrt z) z (expt z 1 z 2 ) z 1 z 2 z 1 0 z 1 z 2 0 z z = z2 log z1 = e (make-rectangular x 1 x 2 ) (make-polar x 3 x 4 ) (real-part z) (imag-part z) (magnitude z) (angle z) x 1 x 2 x 3 x 4 z z = x 1 + x 2 i = x 3 e ix 4 (make-rectangular x 1 x 2) = z (make-polar x 3 x 4) = z (real-part z) = x 1 (imag-part z) = x 2 (magnitude z) = x 3 (angle z) = x angle π < x angle π n x angle = x 4 + 2πn magnitude abs abs magnitude (exact->inexact z) (inexact->exact z) exact->inexact z inexact->exact z (number->string z) (number->string z radix) radix radix 10 number->string (let ((number number) (radix radix)) (eqv? number (string->number (number->string number radix) radix))) z 10 [3, 5] number->string z z z 10 NaN (string->number string) (string->number string radix) string radix radix radix string "#o177" radix 10 string string->number #f (string->number "100") = 100 (string->number "100" 16) = 256 (string->number "1e2") = (string->number "15##") = Scheme string->number string string->number #f string string->number #f string string->number #f string # string->number #f string string->number #f

23 Scheme #t #f Scheme (if cond and or do) Scheme #f #f Scheme #t Lisp Scheme #f nil #t = #t #f = #f #f = #f (not obj ) obj not #t #f (not #t) = #f (not 3) = #f (not (list 3)) = #f (not #f) = #t (not ()) = #f (not (list)) = #f (not nil) = #f (boolean? obj ) library library obj #t #f boolean? #t #f (boolean? #f) = #t (boolean? 0) = #f (boolean? ()) = #f Pair Dotted pair car cdr cons car cdr car cdr car cdr set-car! set-cdr! cdr X X list X cdr list X car car cdr car cdr Scheme (c 1. c 2 ) c 1 car c 2 cdr (4. 5) car 4 cdr 5 (4. 5) () (a b c d e) (a. (b. (c. (d. (e. ()))))) (a b c. d) (a. (b. (c. d))) cdr set-cdr! (define x (list a b c)) (define y x) y = (a b c) (list? y) = #t (set-cdr! x 4) = x = (a. 4) (eqv? x y) = #t y = (a. 4) (list? y) = #f (set-cdr! x x) = (list? x) = #f read datum ` datum, datum,@ datum quote quasiquote unquote unquote-splicing datum Scheme Scheme expression datum

24 24 Scheme read Scheme 3.3 (pair? obj ) obj pair? #t #f (pair? (a. b)) = #t (pair? (a b c)) = #t (pair? ()) = #f (pair? #(a b)) = #f (cons obj 1 obj 2 ) car obj 1 cdr obj 2 eqv? (cons a ()) = (a) (cons (a) (b c d)) = ((a) b c d) (cons "a" (b c)) = ("a" b c) (cons a 3) = (a. 3) (cons (a b) c) = ((a b). c) (car pair) pair car car (car (a b c)) = a (car ((a) b c d)) = (a) (car (1. 2)) = 1 (car ()) = (cdr pair) pair cdr cdr (cdr ((a) b c d)) = (b c d) (cdr (1. 2)) = 2 (cdr ()) = (set-car! pair obj ) obj pair car set-car! (define (f) (list not-a-constant-list)) (define (g) (constant-list)) (set-car! (f) 3) = (set-car! (g) 3) = (set-cdr! pair obj ) obj pair cdr set-cdr! (caar pair) (cadr pair).. (cdddar pair) (cddddr pair) library library.. library library car cdr caddr (define caddr (lambda (x) (car (cdr (cdr x))))). Scheme (null? obj ) obj #t #f (list? obj ) library library obj #t #f (list obj... ) (list? (a b c)) = #t (list? ()) = #t (list? (a. b)) = #f (let ((x (list a))) (set-cdr! x x) (list? x)) = #f (list a (+ 3 4) c) = (a 7 c) (list) = () (length list) list (length (a b c)) = 3 (length (a (b) (c d e))) = 3 (length ()) = 0 (append list... ) library library library list list (append (x) (y)) = (x y) (append (a) (b c d)) = (a b c d) (append (a (b)) ((c))) = (a (b) (c)) list (append (a b) (c. d)) = (a b c. d) (append () a) = a

25 6. 25 (reverse list) library list (reverse (a b c)) = (c b a) (reverse (a (b c) d (e (f)))) = ((e (f)) d (b c) a) (list-tail list k) library list k list k list-tail (define list-tail (lambda (x k) (if (zero? k) x (list-tail (cdr x) (- k 1))))) (list-ref list k) library list k (list-tail list k) car list k (list-ref (a b c d) 2) = c (list-ref (a b c d) (inexact->exact (round 1.8))) = c (memq obj list) (memv obj list) (member obj list) library library library list car obj list k list (list-tail list k) list obj #f obj list memq eq? memv eqv? member equal? (memq a (a b c)) = (a b c) (memq b (a b c)) = (b c) (memq a (b c d)) = #f (memq (list a) (b (a) c)) = #f (member (list a) (b (a) c)) = ((a) c) (memq 101 ( )) = (memv 101 ( )) = ( ) (assq obj alist) (assv obj alist) (assoc obj alist) library library library alistassociation list alist car obj alist car obj #f obj list car assq eq? assv eqv? assoc equal? (define e ((a 1) (b 2) (c 3))) (assq a e) = (a 1) (assq b e) = (b 2) (assq d e) = #f (assq (list a) (((a)) ((b)) ((c)))) = #f (assoc (list a) (((a)) ((b)) ((c)))) = ((a)) (assq 5 ((2 3) (5 7) (11 13))) = (assv 5 ((2 3) (5 7) (11 13))) = (5 7) memq memv member assq assv assoc #t #f eqv? Scheme Pascal Scheme read write eqv? string->symbol / Scheme (Slashification) / Scheme (Uninterned symbols) / (symbol? obj ) obj #t #f (symbol? foo) = #t (symbol? (car (a b))) = #t (symbol? "bar") = #f (symbol? nil) = #t (symbol? ()) = #f (symbol? #f) = #f (symbol->string symbol) symbol read

26 26 Scheme 5 Scheme string->symbol string->symbol string-set! Scheme (symbol->string flying-fish) = "flying-fish" (symbol->string Martin) = "martin" (symbol->string (string->symbol "Malvina")) = "Malvina" (string->symbol string) string Scheme symbol->string Scheme (eq? mississippi mississippi) = #t (string->symbol "mississippi") = "mississippi" (eq? bitblt (string->symbol "bitblt")) = #f (eq? JollyWog (string->symbol (symbol->string JollyWog))) = #t (string=? "K. Harper, M.D." (symbol->string (string->symbol "K. Harper, M.D."))) = #t #\ character #\ character name #\a ; #\A ; #\( ; #\ ; #\space ; #\newline ; #\ character #\ character name #\ character character character #\space #\space #\ -ci Case insensitive (char? obj ) obj #t #f (char=? char 1 char 2 ) (char<? char 1 char 2 ) (char>? char 1 char 2 ) (char<=? char 1 char 2 ) (char>=? char 1 char 2 ) (char<? #\A #\B) #t (char<? #\a #\b) #t (char<? #\0 #\9) #t (char-ci=? char 1 char 2 ) library (char-ci<? char 1 char 2 ) library (char-ci>? char 1 char 2 ) library (char-ci<=? char 1 char 2 ) library (char-ci>=? char 1 char 2 ) library char=? (char-ci=? #\A #\a) #t (char-alphabetic? char) (char-numeric? char) (char-whitespace? char) (char-upper-case? letter) (char-lower-case? letter) library library library library library #t #f ASCII 52 10

27 6. 27 (char->integer char) (integer->char n) char->integer char->integer integer->char char<=? <= (Order-preserving isomorphisms) (char<=? a b) = #t and (<= x y) = #t x y integer->char (<= (char->integer a) (char->integer b)) = #t (char<=? (integer->char x) (integer->char y)) = #t (char-upcase char) (char-downcase char) library library (char-ci=? char char 2 ) char 2 char char-upcase char-downcase (") (\) "The word \"recursion\" has many meanings." Scheme 0 1 string start end start end start end start end string -ci Case insensitive (string? obj ) obj #t #f (make-string k) (make-string k char) make-string k char char string (string char... ) (string-length string) string (string-ref string k) library k string string-ref string k (string-set! string k char) k string string-set! char string k (define (f) (make-string 3 #\*)) (define (g) "***") (string-set! (f) 0 #\?) = (string-set! (g) 0 #\?) = (string-set! (symbol->string immutable) 0 #\?) = (string=? string 1 string 2 ) library (string-ci=? string 1 string 2 ) library #t #f string-ci=? string=? (string<? string 1 string 2 ) library (string>? string 1 string 2 ) library (string<=? string 1 string 2 ) library (string>=? string 1 string 2 ) library (string-ci<? string 1 string 2 ) library (string-ci>? string 1 string 2 ) library (string-ci<=? string 1 string 2 ) library (string-ci>=? string 1 string 2 ) library string<? char<? Scheme string=? string-ci=?

28 28 Scheme 5 (substring string start end) library string start end 0 start end (string-length string). substring string start end (string-append string... ) library (string->list string) (list->string list) library library string->list list->string list list equal? string->list list-> string (string-copy string) string (string-fill! string char) library library char string #(obj... ) ( ) 2 "Anna" #(0 ( ) "Anna") #(0 ( ) "Anna") = #(0 ( ) "Anna") (vector? obj ) obj #t #f (make-vector k) (make-vector k fill) k fill (vector obj... ) library list (vector a b c) = #(a b c) (vector-length vector) vector (vector-ref vector k) k vector vector-ref vector k (vector-ref #( ) 5) = 8 (vector-ref #( ) (let ((i (round (* 2 (acos -1))))) (if (inexact? i) (inexact->exact i) i))) = 13 (vector-set! vector k obj ) k vector vector-set! obj vector k vector-set! (let ((vec (vector 0 ( ) "Anna"))) (vector-set! vec 1 ("Sue" "Sue")) vec) = #(0 ("Sue" "Sue") "Anna") (vector-set! #(0 1 2) 1 "doe") = ; (vector->list vector) (list->vector list) library library vector->list vector list->vector list

29 6. 29 (vector->list #(dah dah didah)) = (dah dah didah) (list->vector (dididit dah)) = #(dididit dah) (vector-fill! vector fill) library fill vector vector-fill! 6.4.? (? obj ) obj #t #f (? car) = #t (? car) = #f (? (lambda (x) (* x x))) = #t (? (lambda (x) (* x x))) = #f (call-with-current-continuation?) = #t (apply proc arg 1... args) proc args (append (list arg 1... ) args) proc (apply + (list 3 4)) = 7 (define compose (lambda (f g) (lambda args (f (apply g args))))) ((compose sqrt *) 12 75) = 30 (map proc list 1 list 2... ) library list proc list list map proc list proc list (map cadr ((a b) (d e) (g h))) = (b e h) (map (lambda (n) (expt n n)) ( )) = ( ) (map + (1 2 3) (4 5 6)) = (5 7 9) (let ((count 0)) (map (lambda (ignored) (set! count (+ count 1)) count) (a b))) = (1 2) (2 1) (for-each proc list 1 list 2... ) library for-each map for-each proc map for-each proc list for-each (let ((v (make-vector 5))) (for-each (lambda (i) (vector-set! v i (* i i))) ( )) v) = #( ) (force promise) library promise delay (force (delay (+ 1 2))) = 3 (let ((p (delay (+ 1 2)))) (list (force p) (force p))) = (3 3) (define a-stream (letrec ((next (lambda (n) (cons n (delay (next (+ n 1))))))) (next 0))) (define head car) (define tail (lambda (stream) (force (cdr stream)))) (head (tail (tail a-stream))) = 2 force delay (define count 0) (define p (delay (begin (set! count (+ count 1)) (if (> count x) count (force p))))) (define x 5) p = (force p) = 6 p = (begin (set! x 10) (force p)) = 6

30 30 Scheme 5 delay force force (define force (lambda (object) (object))) (delay expression ) (make-promise (lambda () expression )) (define-syntax delay (syntax-rules () ((delay expression) (make-promise (lambda () expression))))) make-promise (define make-promise (lambda (proc) (let ((result-ready? #f) (result #f)) (lambda () (if result-ready? result (let ((x (proc))) (if result-ready? result (begin (set! result-ready? #t) (set! result x) result)))))))) make-promise delay force force #t #f (eqv? (delay 1) 1) = (pair? (delay (cons 1 2))) = (Implicit forcing) cdr + (+ (delay (* 3 7)) 13) = 34 (call-with-current-continuation proc) proc call-with-current-continuation (Escape ) proc Scheme dynamic-wind before after call-with-current-continuation call-with-values call-with-values proc Scheme call-with-current-continuation call-with-current-continuation (call-with-current-continuation (lambda (exit) (for-each (lambda (x) (if (negative? x) (exit x))) ( )) #t)) = -3 (define list-length (lambda (obj) (call-with-current-continuation (lambda (return) (letrec ((r (lambda (obj) (cond ((null? obj) 0) ((pair? obj) (+ (r (cdr obj)) 1)) (else (return #f)))))) (r obj)))))) (list-length ( )) = 4 (list-length (a b. c)) = #f call-with-current-continuation call-with-current-continuation Scheme

31 6. 31 call-with-current-continuation Scheme exit return goto 1965 Peter Landin[16] J-operator John Reynolds[24] Scheme Sussman Steele catch Reynolds MacLisp Scheme catch 1982 call-with-current-continuation call/cc (values obj...) call-with-values values (define (values. things) (call-with-current-continuation (lambda (cont) (apply cont things)))) (call-with-values producer consumer) producer consumer consumer call-with-values (call-with-values (lambda () (values 4 5)) (lambda (a b) b)) = 5 (call-with-values * -) = -1 (dynamic-wind before thunk after) thunk before after call-with-current-continuation thunk (Dynamic extent) before thunk after Scheme call-with-current-continuation call-with-current-continuation thunk dynamic-wind dynamic-wind after dynamic-wind after thunk dynamic-wind dynamic-wind before dynamic-wind before dynamic-wind before dynamic-wind after after before after (let ((path ()) (c #f)) (let ((add (lambda (s) (set! path (cons s path))))) (dynamic-wind (lambda () (add connect)) (lambda () (add (call-with-current-continuation (lambda (c0) (set! c c0) talk1)))) (lambda () (add disconnect))) (if (< (length path) 4) (c talk2) (reverse path)))) 6.5. = (connect talk1 disconnect connect talk2 disconnect) (eval expression environment-specifier) expression expression Scheme

32 32 Scheme 5 environment-specifier Scheme eval eval null-environment scheme-report-environment (eval (* 7 3) (scheme-report-environment 5)) = 21 (let ((f (eval (lambda (f x) (f x x)) (null-environment 5)))) (f + 10)) = 20 (scheme-report-environment version) (null-environment version) version Scheme 5 5 scheme-report-environment Scheme null-environment Scheme version version 5 Scheme Scheme eval scheme-report-environment car scheme-report-environment (interaction-environment) optional Scheme Scheme Ports (Port) Scheme Scheme Scheme (call-with-input-file string proc) library (call-with-output-file string proc) library string proc call-with-input-file call-with-output-file proc proc proc proc Scheme Scheme call-with-current-continuation call-with-input-file call-with-output-file (input-port? obj ) (output-port? obj ) obj #t #f (current-input-port) (current-output-port) (with-input-from-file string thunk) optional (with-output-to-file string thunk) optional string thunk with-input-from-file with-output-to-file current-input-port current-output-port (read) (write obj ) thunk thunk with-input-from-file with-output-to-file thunk (open-input-file filename) (open-output-file filename)

33 6. 33 (close-input-port port) (close-output-port port) port port (read) (read port) library library read Scheme datum read port port (End of file) port current-input-port (read-char) (read-char port) port port port current-input-port (peek-char) (peek-char port) port port port current-input-port peek-char port read-char port read-char peek-char peek-char read-char peek-char (eof-object? obj ) obj #t #f Scheme read (char-ready?) (char-ready? port) port #t #f char-ready #t port read-char port char-ready? #t port current-input-port char-ready? char-ready? char-ready? #f (write obj ) (write obj port) library library port obj #\ write port current-output-port (display obj ) (display obj port) library library port obj write-char write display port current-output-port write display write display (newline) (newline port) library library port port current-output-port (write-char char) (write-char char port) port char port current-output-port

34 34 Scheme (load filename) optional filename Scheme load load current-input-port current-output-port load load (transcript-on filename) (transcript-off) optional optional filename transcript-on Scheme transcript-off 7. Scheme 7.1. BNF Scheme #x1a #X1a empty BNF thing * thing thing + thing Token intertoken space delimiter [ ] { } token identifier boolean number character string ( ) #( `,,@. delimiter whitespace ( ) " ; whitespace space or newline comment ; all subsequent characters up to a line break atmosphere whitespace comment intertoken space atmosphere * identifier initial subsequent * peculiar identifier initial letter special initial letter a b c... z special initial! $ % & * / : < = >? ^ _ ~ subsequent initial digit special subsequent digit special subsequent + peculiar identifier syntactic keyword expression keyword else => define unquote unquote-splicing expression keyword quote lambda if set! begin cond and or case

35 7. 35 let let* letrec do delay quasiquote variable any identifier that isn t also a syntactic keyword boolean #t #f character #\ any character #\ character name character name space newline string " string element * " string element any character other than " or \ \" \\ number num 2 num 8 num 10 num 16 num R complex R real R ureal R uinteger R prefix R R = 2, 8, 10, 16 decimal 2 decimal 8 decimal 16 num R prefix R complex R complex R real R real real R real R + ureal R i real R - ureal R i real R + i real R - i + ureal R i - ureal R i + i - i real R sign ureal R ureal R uinteger R uinteger R / uinteger R decimal R decimal 10 uinteger 10 suffix. digit 10 + #* suffix digit digit 10 * #* suffix digit 10 + # +. #* suffix uinteger R digit R + #* prefix R radix R exactness exactness radix R suffix empty exponent marker sign digit 10 + exponent marker e s f d l sign empty + - exactness empty #i #e radix 2 #b radix 8 #o radix 10 empty #d radix 16 #x digit digit digit 10 digit digit 16 digit 10 a b c d e f datum read expression datum datum simple datum compound datum simple datum boolean number character string symbol symbol identifier compound datum list vector list ( datum *) ( datum +. datum ) abbreviation abbreviation abbrev prefix datum abbrev prefix `,,@ vector #( datum *) expression variable literal call lambda expression conditional assignment derived expression macro use macro block literal quotation self-evaluating self-evaluating boolean number character string quotation datum (quote datum ) call ( operator operand *) operator expression operand expression lambda expression (lambda formals body ) formals ( variable *) variable ( variable +. variable ) body definition * sequence sequence command * expression command expression conditional (if test consequent alternate ) test expression consequent expression alternate expression empty assignment (set! variable expression ) derived expression (cond cond clause + ) (cond cond clause * (else sequence )) (case expression case clause + )

36 36 Scheme 5 (case expression case clause * (else sequence )) (and test *) (or test *) (let ( binding spec *) body ) (let variable ( binding spec *) body ) (let* ( binding spec *) body ) (letrec ( binding spec *) body ) (begin sequence ) (do ( iteration spec *) ( test do result ) command *) (delay expression ) quasiquotation cond clause ( test sequence ) ( test ) ( test => recipient ) recipient expression case clause (( datum *) sequence ) binding spec ( variable expression ) iteration spec ( variable init step ) ( variable init ) init expression step expression do result sequence empty macro use ( keyword datum *) keyword identifier macro block (let-syntax ( syntax spec *) body ) (letrec-syntax ( syntax spec *) body ) syntax spec ( keyword transformer spec ) D = 1, 2, 3,... D quasiquotation quasiquotation 1 qq template 0 expression quasiquotation D ` qq template D (quasiquote qq template D ) qq template D simple datum list qq template D vector qq template D unquotation D list qq template D ( qq template or splice D *) ( qq template or splice D +. qq template D ) qq template D quasiquotation D + 1 vector qq template D #( qq template or splice D *) unquotation D, qq template D 1 (unquote qq template D 1 ) qq template or splice D qq template D splicing unquotation D splicing unquotation D,@ qq template D 1 (unquote-splicing qq template D 1 ) quasiquotation list qq template D unquotation D splicing unquotation D unquotation splicing unquotation D transformer spec (syntax-rules ( identifier *) syntax rule *) syntax rule ( pattern template ) pattern pattern identifier ( pattern *) ( pattern +. pattern ) ( pattern * pattern ellipsis ) #( pattern *) #( pattern * pattern ellipsis ) pattern datum pattern datum string character boolean number template pattern identifier ( template element *) ( template element +. template ) #( template element *) template datum template element template template ellipsis template datum pattern datum pattern identifier any identifier except... ellipsis the identifier program command or definition * command or definition command definition syntax definition (begin command or definition + ) definition (define variable expression ) (define ( variable def formals ) body ) (begin definition *) def formals variable * variable *. variable syntax definition

37 7. 37 (define-syntax keyword transformer spec ) (lambda I Γ* E 0 ) (if E 0 E 1 E 2 ) (if E 0 E 1 ) (set! I E) 7.2. Scheme [29]... s k s k 1 #s s s t s t s k s k t a, b McCarthy t a b ρ[x/i] ρ x i x in D x D x D x D (Expression continuation) permute unpermute new new σ L σ (new σ L) 2 = false K K P P E[[((lambda (I*) P ) undefined... )]] I* P P P undefined undefined E K Con I Ide E Exp Γ Com = Exp Exp K I (E 0 E*) (lambda (I*) Γ* E 0 ) (lambda (I*. I) Γ* E 0 ) α L ν N T = {false, true} Q H R E p = L L T E v = L* T E s = L* T M = {false, true, null, undefined, unspecified} φ F = L (E* K C) ɛ E = Q + H + R + E p + E v + E s + M + F σ S = L (E T) ρ U = Ide L θ C = S A κ K = E* C A X K : Con E E : Exp U K C E* : Exp* U K C C : Com* U C C K E[[K]] = λρκ. send (K[[K]]) κ E[[I]] = λρκ. hold (lookup ρ I) (single(λɛ. ɛ = undefined wrong undefined variable, send ɛ κ)) E[[(E 0 E*)]] = λρκ. E*(permute( E 0 E*)) ρ (λɛ*. ((λɛ*. applicate (ɛ* 1) (ɛ* 1) κ) (unpermute ɛ*))) E[[(lambda (I*) Γ* E 0)]] = λρκ. λσ. new σ L send ( new σ L, λɛ*κ. #ɛ* = #I* tievals(λα*. (λρ. C[[Γ*]]ρ (E [E 0 ]ρ κ )) (extends ρ I* α*)) ɛ*,

38 38 Scheme 5 wrong wrong number of arguments in E) κ (update (new σ L) unspecified σ), wrong out of memory σ E [(lambda (I*. I) Γ* E 0)] = λρκ. λσ. new σ L send ( new σ L, λɛ*κ. #ɛ* #I* tievalsrest (λα*. (λρ. C [Γ*]ρ (E [E 0 ]ρ κ )) (extends ρ (I* I ) α*)) ɛ* (#I*), wrong too few arguments in E) κ (update (new σ L) unspecified σ), wrong out of memory σ E [(lambda I Γ* E 0)]] = E [(lambda (. I) Γ* E 0)] E [(if E 0 E 1 E 2)]] = λρκ. E[[E 0]] ρ (single (λɛ. truish ɛ E [E 1 ]ρκ, E [E 2 ]ρκ)) E [(if E 0 E 1)]] = λρκ. E[[E 0]] ρ (single (λɛ. truish ɛ E [E 1 ]ρκ, send unspecified κ)) undefined unspecified E [(set! I E)]] = λρκ. E[[E]] ρ (single(λɛ. assign (lookup ρ I) ɛ (send unspecified κ))) E*[ ] = λρκ. κ E*[E 0 E*]] = λρκ. E[[E 0]] ρ (single(λɛ 0. E*[E*] ρ (λɛ*. κ ( ɛ 0 ɛ*)))) C [ ] = λρθ. θ C [Γ 0 Γ*]] = λρθ. E[[Γ 0]] ρ (λɛ*. C [Γ*]ρθ) lookup : U Ide L lookup = λρi. ρi extends : U Ide* L* U extends = λρi*α*. #I* = 0 ρ, extends (ρ[(α* 1)/(I* 1)]) (I* 1) (α* 1) wrong : X C send : E K C send = λɛκ. κ ɛ [implementation-dependent] single : (E C) K single = λψɛ*. #ɛ* = 1 ψ(ɛ* 1), wrong wrong number of return values new : S (L + {error}) hold : L K C hold = λακσ. send (σα 1)κσ assign : L E C C assign = λαɛθσ. θ(update αɛσ) update : L E S S update = λαɛσ. σ[ ɛ, true /α] [implementation-dependent] tievals : (L* C) E* C tievals = λψɛ*σ. #ɛ* = 0 ψ σ, new σ L tievals (λα*. ψ( new σ L α*)) (ɛ* 1) (update(new σ L)(ɛ* 1)σ), wrong out of memory σ tievalsrest : (L* C) E* N C tievalsrest = λψɛ*ν. list (dropfirst ɛ*ν) (single(λɛ. tievals ψ ((takefirst ɛ*ν) ɛ ))) dropfirst = λln. n = 0 l, dropfirst (l 1)(n 1) takefirst = λln. n = 0, l 1 (takefirst (l 1)(n 1)) truish : E T truish = λɛ. ɛ = false false, true permute : Exp* Exp* unpermute : E* E* [implementation-dependent] [inverse of permute] applicate : E E* K C applicate = λɛɛ*κ. ɛ F (ɛ F 2)ɛ*κ, wrong bad onearg : (E K C) (E* K C) onearg = λζɛ*κ. #ɛ* = 1 ζ(ɛ* 1)κ, wrong wrong number of arguments twoarg : (E E K C) (E* K C) twoarg = λζɛ*κ. #ɛ* = 2 ζ(ɛ* 1)(ɛ* 2)κ, wrong wrong number of arguments list : E* K C list = λɛ*κ. #ɛ* = 0 send null κ, list (ɛ* 1)(single(λɛ. cons ɛ* 1, ɛ κ)) cons : E* K C cons = twoarg (λɛ 1ɛ 2κσ. new σ L (λσ. new σ L send ( new σ L, new σ L, true in E) κ

39 7. 39 (update(new σ L)ɛ 2σ ), wrong out of memory σ ) (update(new σ L)ɛ 1σ), wrong out of memory σ) less : E* K C less = twoarg (λɛ 1ɛ 2κ. (ɛ 1 R ɛ 2 R) send (ɛ 1 R < ɛ 2 R true, false)κ, wrong non-numeric argument to < ) add : E* K C add = twoarg (λɛ 1ɛ 2κ. (ɛ 1 R ɛ 2 R) send ((ɛ 1 R + ɛ 2 R) in E)κ, wrong non-numeric argument to + ) car : E* K C car = onearg (λɛκ. ɛ E p hold (ɛ E p 1)κ, wrong non-pair argument to car ) cdr : E* K C [similar to car] setcar : E* K C setcar = twoarg (λɛ 1ɛ 2κ. ɛ 1 E p (ɛ 1 E p 3) assign (ɛ 1 E p 1) ɛ 2 (send unspecified κ), wrong immutable argument to set-car!, wrong non-pair argument to set-car! ) eqv : E* K C eqv = twoarg (λɛ 1ɛ 2κ. (ɛ 1 M ɛ 2 M) send (ɛ 1 M = ɛ 2 M true, false)κ, (ɛ 1 Q ɛ 2 Q) send (ɛ 1 Q = ɛ 2 Q true, false)κ, (ɛ 1 H ɛ 2 H) send (ɛ 1 H = ɛ 2 H true, false)κ, (ɛ 1 R ɛ 2 R) send (ɛ 1 R = ɛ 2 R true, false)κ, (ɛ 1 E p ɛ 2 E p) send ((λp 1p 2. ((p 1 1) = (p 2 1) (p 1 2) = (p 2 2)) true, false) (ɛ 1 E p) (ɛ 2 E p)) κ, (ɛ 1 E v ɛ 2 E v)..., (ɛ 1 E s ɛ 2 E s)..., (ɛ 1 F ɛ 2 F) send ((ɛ 1 F 1) = (ɛ 2 F 1) true, false) κ, send false κ) apply : E* K C apply = twoarg (λɛ 1ɛ 2κ. ɛ 1 F valueslist ɛ 2 (λɛ*. applicate ɛ 1ɛ*κ), wrong bad argument to apply ) valueslist : E* K C valueslist = onearg (λɛκ. ɛ E p cdr ɛ (λɛ*. valueslist ɛ* (λɛ*. car ɛ (single(λɛ. κ( ɛ ɛ*))))), ɛ = null κ, wrong non-list argument to values-list ) cwcc : E* K C [call-with-current-continuation] cwcc = onearg (λɛκ. ɛ F (λσ. new σ L applicate ɛ new σ L, λɛ*κ. κɛ* in E κ (update (new σ L) unspecified σ), wrong out of memory σ), wrong bad argument ) values : E* K C values = λɛ*κ. κɛ* cwv : E* K C [call-with-values] cwv = twoarg (λɛ 1ɛ 2κ. applicate ɛ 1 (λɛ*. applicate ɛ 2 ɛ*)) 7.3. lambda if set! delay 6.4 (define-syntax cond (syntax-rules (else =>) ((cond (else result1 result2...)) (begin result1 result2...)) ((cond (test => result)) (let ((temp test)) (if temp (result temp)))) ((cond (test => result) clause1 clause2...) (let ((temp test)) (if temp (result temp) (cond clause1 clause2...)))) ((cond (test)) test) ((cond (test) clause1 clause2...) (let ((temp test)) (if temp temp (cond clause1 clause2...)))) ((cond (test result1 result2...)) (if test (begin result1 result2...))) ((cond (test result1 result2...) clause1 clause2...) (if test (begin result1 result2...)

40 40 Scheme 5 (cond clause1 clause2...))))) (define-syntax case (syntax-rules (else) ((case (key...) clauses...) (let ((atom-key (key...))) (case atom-key clauses...))) ((case key (else result1 result2...)) (begin result1 result2...)) ((case key ((atoms...) result1 result2...)) (if (memv key (atoms...)) (begin result1 result2...))) ((case key ((atoms...) result1 result2...) clause clauses...) (if (memv key (atoms...)) (begin result1 result2...) (case key clause clauses...))))) (define-syntax and (syntax-rules () ((and) #t) ((and test) test) ((and test1 test2...) (if test1 (and test2...) #f)))) (define-syntax or (syntax-rules () ((or) #f) ((or test) test) ((or test1 test2...) (let ((x test1)) (if x x (or test2...)))))) (define-syntax let (syntax-rules () ((let ((name val)...) body1 body2...) ((lambda (name...) body1 body2...) val...)) ((let tag ((name val)...) body1 body2...) ((letrec ((tag (lambda (name...) body1 body2...))) tag) val...)))) (define-syntax let* (syntax-rules () ((let* () body1 body2...) (let () body1 body2...)) ((let* ((name1 val1) (name2 val2)...) body1 body2...) (let ((name1 val1)) (let* ((name2 val2)...) body1 body2...))))) letrec <undefined> Scheme (define-syntax letrec (syntax-rules () ((letrec ((var1 init1)...) body...) (letrec "generate temp names" (var1...) () ((var1 init1)...) body...)) ((letrec "generate temp names" () (temp1...) ((var1 init1)...) body...) (let ((var1 <undefined>)...) (let ((temp1 init1)...) (set! var1 temp1)... body...))) ((letrec "generate temp names" (x y...) (temp...) ((var1 init1)...) body...) (letrec "generate temp names" (y...) (newtemp temp...) ((var1 init1)...) body...)))) (define-syntax begin (syntax-rules () ((begin exp...) ((lambda () exp...))))) begin lambda begin (define-syntax begin (syntax-rules () ((begin exp) exp) ((begin exp1 exp2...) (let ((x exp1)) (begin exp2...))))) do letrec (if #f #f) (define-syntax do

41 41 (syntax-rules () ((do ((var init step...)...) (test expr...) command...) (letrec ((loop (lambda (var...) (if test (begin (if #f #f) expr...) (begin command... (loop (do "step" var step...)...)))))) (loop init...))) ((do "step" x) x) ((do "step" x y) y))) 4 [6] Scheme IEEE Scheme [13] Scheme IEEE true load with-input-from-file with-output-tofile transcript-on transcript-off interaction-environment - / IEEE port syntax-rules eval Internet Scheme Scheme Scheme

42 42 Scheme 5 integrate-system Runge-Kutta y k = f k (y 1, y 2,..., y n ), k = 1,..., n system-derivative y 1,..., y n y 1,..., y n initial-state h integrate-system (define integrate-system (lambda (system-derivative initial-state h) (let ((next (runge-kutta-4 system-derivative h))) (letrec ((states (cons initial-state (delay (map-streams next states))))) states)))) runge-kutta-4 f runge-kutta-4 (define runge-kutta-4 (lambda (f h) (let ((*h (scale-vector h)) (*2 (scale-vector 2)) (*1/2 (scale-vector (/ 1 2))) (*1/6 (scale-vector (/ 1 6)))) (lambda (y) ;; y is a system state (let* ((k0 (*h (f y))) (k1 (*h (f (add-vectors y (*1/2 k0))))) (k2 (*h (f (add-vectors y (*1/2 k1))))) (k3 (*h (f (add-vectors y k2))))) (add-vectors y (*1/6 (add-vectors k0 (*2 k1) (*2 k2) k3)))))))) (define elementwise (lambda (f) (lambda vectors (generate-vector (vector-length (car vectors)) (lambda (i) (apply f (map (lambda (v) (vector-ref vectors))))))) v i)) (loop 0))))) (define add-vectors (elementwise +)) (else (vector-set! ans i (proc i)) (loop (+ i 1))))))) (define scale-vector (lambda (s) (elementwise (lambda (x) (* x s))))) map-streams map (define map-streams (lambda (f s) (cons (f (head s)) (delay (map-streams f (tail s)))))) car cdr (define head car) (define tail (lambda (stream) (force (cdr stream)))) integrate-system C dv C dt = i L v C R L di L dt = v C (define damped-oscillator (lambda (R L C) (lambda (state) (let ((Vc (vector-ref state 0)) (Il (vector-ref state 1))) (vector (- 0 (+ (/ Vc (* R C)) (/ Il C))) (/ Vc L)))))) (define the-states (integrate-system (damped-oscillator ) #(1 0).01)) (define generate-vector (lambda (size proc) (let ((ans (make-vector size))) (letrec ((loop (lambda (i) (cond ((= i size) ans)

C/C++ - 函数

C/C++ - 函数 C/C++ Table of contents 1. 2. 3. & 4. 5. 1 2 3 # include # define SIZE 50 int main ( void ) { float list [ SIZE ]; readlist (list, SIZE ); sort (list, SIZE ); average (list, SIZE ); bargragh

More information

科学计算的语言-FORTRAN95

科学计算的语言-FORTRAN95 科 学 计 算 的 语 言 -FORTRAN95 目 录 第 一 篇 闲 话 第 1 章 目 的 是 计 算 第 2 章 FORTRAN95 如 何 描 述 计 算 第 3 章 FORTRAN 的 编 译 系 统 第 二 篇 计 算 的 叙 述 第 4 章 FORTRAN95 语 言 的 形 貌 第 5 章 准 备 数 据 第 6 章 构 造 数 据 第 7 章 声 明 数 据 第 8 章 构 造

More information

ebook14-4

ebook14-4 4 TINY LL(1) First F o l l o w t o p - d o w n 3 3. 3 backtracking parser predictive parser recursive-descent parsing L L ( 1 ) LL(1) parsing L L ( 1 ) L L ( 1 ) 1 L 2 L 1 L L ( k ) k L L ( 1 ) F i r s

More information

WWW PHP Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2

WWW PHP Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2 WWW PHP 2003 1 Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2 Comments PHP Shell Style: # C++ Style: // C Style: /* */ $value = $p * exp($r * $t); # $value

More information

C/C++ - 字符输入输出和字符确认

C/C++ - 字符输入输出和字符确认 C/C++ Table of contents 1. 2. getchar() putchar() 3. (Buffer) 4. 5. 6. 7. 8. 1 2 3 1 // pseudo code 2 read a character 3 while there is more input 4 increment character count 5 if a line has been read,

More information

Computer Architecture

Computer Architecture ECE 3120 Computer Systems Assembly Programming Manjeera Jeedigunta http://blogs.cae.tntech.edu/msjeedigun21 Email: msjeedigun21@tntech.edu Tel: 931-372-6181, Prescott Hall 120 Prev: Basic computer concepts

More information

C/C++语言 - 运算符、表达式和语句

C/C++语言 - 运算符、表达式和语句 C/C++ Table of contents 1. 2. 3. 4. C C++ 5. 6. 7. 1 i // shoe1.c: # include # define ADJUST 7. 64 # define SCALE 0. 325 int main ( void ) { double shoe, foot ; shoe = 9. 0; foot = SCALE * shoe

More information

C/C++语言 - C/C++数据

C/C++语言 - C/C++数据 C/C++ C/C++ Table of contents 1. 2. 3. 4. char 5. 1 C = 5 (F 32). 9 F C 2 1 // fal2cel. c: Convert Fah temperature to Cel temperature 2 # include < stdio.h> 3 int main ( void ) 4 { 5 float fah, cel ;

More information

C/C++ - 文件IO

C/C++ - 文件IO C/C++ IO Table of contents 1. 2. 3. 4. 1 C ASCII ASCII ASCII 2 10000 00100111 00010000 31H, 30H, 30H, 30H, 30H 1, 0, 0, 0, 0 ASCII 3 4 5 UNIX ANSI C 5 FILE FILE 6 stdio.h typedef struct { int level ;

More information

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

C/C++ 语言 - 循环

C/C++ 语言 - 循环 C/C++ Table of contents 7. 1. 2. while 3. 4. 5. for 6. 8. (do while) 9. 10. (nested loop) 11. 12. 13. 1 // summing.c: # include int main ( void ) { long num ; long sum = 0L; int status ; printf

More information

2013 C 1 #include <stdio.h> 2 int main(void) 3 { 4 int cases, i; 5 long long a, b; 6 scanf("%d", &cases); 7 for (i = 0; i < cases; i++) 8 { 9 scanf("%

2013 C 1 #include <stdio.h> 2 int main(void) 3 { 4 int cases, i; 5 long long a, b; 6 scanf(%d, &cases); 7 for (i = 0; i < cases; i++) 8 { 9 scanf(% 2013 ( 28 ) ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp Compilation Error long long cin scanf Time Limit Exceeded 1: A 10 B 1 C 1 D 5 E 5 F 1 G II 5 H 30 1 2013 C 1 #include 2 int main(void) 3

More information

四川省普通高等学校

四川省普通高等学校 四 川 省 普 通 高 等 学 校 计 算 机 应 用 知 识 和 能 力 等 级 考 试 考 试 大 纲 (2013 年 试 行 版 ) 四 川 省 教 育 厅 计 算 机 等 级 考 试 中 心 2013 年 1 月 目 录 一 级 考 试 大 纲 1 二 级 考 试 大 纲 6 程 序 设 计 公 共 基 础 知 识 6 BASIC 语 言 程 序 设 计 (Visual Basic) 9

More information

WWW PHP

WWW PHP WWW PHP 2003 1 2 function function_name (parameter 1, parameter 2, parameter n ) statement list function_name sin, Sin, SIN parameter 1, parameter 2, parameter n 0 1 1 PHP HTML 3 function strcat ($left,

More information

Microsoft PowerPoint - STU_EC_Ch02.ppt

Microsoft PowerPoint - STU_EC_Ch02.ppt 樹德科技大學資訊工程系 Chapter 2: Number Systems Operations and Codes Shi-Huang Chen Sept. 2010 1 Chapter Outline 2.1 Decimal Numbers 2.2 Binary Numbers 2.3 Decimal-to-Binary Conversion 2.4 Binary Arithmetic 2.5

More information

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2 Chapter 02 變數與運算式 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.2 2.2.1 2.2.2 2.2.3 type 2.2.4 2.3 2.3.1 print 2.3.2 input 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 + 2.4.6 Python Python 2.1 2.1.1 a p p l e b e a r c 65438790

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1 21 , 7, Windows,,,, : 010-62782989 13501256678 13801310933,,,, ;,, ( CIP) /,,. : ;, 2005. 11 ( 21 ) ISBN 7-81082 - 634-4... - : -. TP316-44 CIP ( 2005) 123583 : : : : 100084 : 010-62776969 : 100044 : 010-51686414

More information

coverage2.ppt

coverage2.ppt Satellite Tool Kit STK/Coverage STK 82 0715 010-68745117 1 Coverage Definition Figure of Merit 2 STK Basic Grid Assets Interval Description 3 Grid Global Latitude Bounds Longitude Lines Custom Regions

More information

BC04 Module_antenna__ doc

BC04 Module_antenna__ doc http://www.infobluetooth.com TEL:+86-23-68798999 Fax: +86-23-68889515 Page 1 of 10 http://www.infobluetooth.com TEL:+86-23-68798999 Fax: +86-23-68889515 Page 2 of 10 http://www.infobluetooth.com TEL:+86-23-68798999

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

CHAPTER VC#

CHAPTER VC# 1. 2. 3. 4. CHAPTER 2-1 2-2 2-3 2-4 VC# 2-5 2-6 2-7 2-8 Visual C# 2008 2-1 Visual C# 0~100 (-32768~+32767) 2 4 VC# (Overflow) 2-1 2-2 2-1 2-1.1 2-1 1 10 10!(1 10) 2-3 Visual C# 2008 10! 32767 short( )

More information

MIT的人工智能实验室是如何做研究的?

MIT的人工智能实验室是如何做研究的? AI Working Paper 316 1988 10 David Chapman 1.3 1988 9 2000 Copyright 1987, 1988 Working Papers 1. MIT 2 AI AI 3 AI 4 AI 5 6 7 8 AI 9 10 11 12 2. AI AI AI Morgan-Kauffman AI Working Memos Technical Reports

More information

三維空間之機械手臂虛擬實境模擬

三維空間之機械手臂虛擬實境模擬 VRML Model of 3-D Robot Arm VRML Model of 3-D Robot Arm MATLAB VRML MATLAB Simulink i MATLAB Simulink V-Realm Build Joystick ii Abstract The major purpose of this thesis presents the procedure of VRML

More information

3.1 num = 3 ch = 'C' 2

3.1 num = 3 ch = 'C' 2 Java 1 3.1 num = 3 ch = 'C' 2 final 3.1 final : final final double PI=3.1415926; 3 3.2 4 int 3.2 (long int) (int) (short int) (byte) short sum; // sum 5 3.2 Java int long num=32967359818l; C:\java\app3_2.java:6:

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

Achieving One TeraFLOPS with 28-nm FPGAs

Achieving One TeraFLOPS with 28-nm FPGAs 28nm FPGA TeraFLOPS WP011421.0 DSP 101 Innovation Drive San Jose, CA 95134 www.altera.com 2010 Altera ALTERA ARRIA CYCLONE HARDCOPY MAX MEGACORE NIOS QUARTUS STRATIX Altera www.altera.com/common/legal.html

More information

untitled

untitled 2006 6 Geoframe Geoframe 4.0.3 Geoframe 1.2 1 Project Manager Project Management Create a new project Create a new project ( ) OK storage setting OK (Create charisma project extension) NO OK 2 Edit project

More information

Fuzzy Highlight.ppt

Fuzzy Highlight.ppt Fuzzy Highlight high light Openfind O(kn) n k O(nm) m Knuth O(n) m Knuth Unix grep regular expression exact match Yahoo agrep fuzzy match Gais agrep Openfind gais exact match fuzzy match fuzzy match O(kn)

More information

Microsoft Word - 苹果脚本跟我学.doc

Microsoft Word - 苹果脚本跟我学.doc AppleScript for Absolute Starters 2 2 3 0 5 1 6 2 10 3 I 13 4 15 5 17 6 list 20 7 record 27 8 II 32 9 34 10 36 11 44 12 46 13 51 14 handler 57 15 62 63 3 AppleScript AppleScript AppleScript AppleScript

More information

穨control.PDF

穨control.PDF TCP congestion control yhmiu Outline Congestion control algorithms Purpose of RFC2581 Purpose of RFC2582 TCP SS-DR 1998 TCP Extensions RFC1072 1988 SACK RFC2018 1996 FACK 1996 Rate-Halving 1997 OldTahoe

More information

Microsoft PowerPoint - Lecture7II.ppt

Microsoft PowerPoint - Lecture7II.ppt Lecture 8II SUDOKU PUZZLE SUDOKU New Play Check 軟體實作與計算實驗 1 4x4 Sudoku row column 3 2 } 4 } block 1 4 軟體實作與計算實驗 2 Sudoku Puzzle Numbers in the puzzle belong {1,2,3,4} Constraints Each column must contain

More information

(Microsoft Word - Motion Program \270\305\264\272\276\363 \307\245\301\366 \271\327 \270\361\302\367.doc)

(Microsoft Word - Motion Program \270\305\264\272\276\363 \307\245\301\366 \271\327 \270\361\302\367.doc) : TBFAT-G5MP-MN004-11 1 GX Series PLC Program Manual 2 GX Series PLC Program Manual Contents Contents...3 1... 1-1 1.1... 1-2 1.2... 1-3 1.2.1... 1-3 1.2.2... 1-4 1.2.3... 1-4 1.2.4... 1-6 1.3... 1-7 1.3.1...

More information

Go构建日请求千亿微服务最佳实践的副本

Go构建日请求千亿微服务最佳实践的副本 Go 构建 请求千亿级微服务实践 项超 100+ 700 万 3000 亿 Goroutine & Channel Goroutine Channel Goroutine func gen() chan int { out := make(chan int) go func(){ for i:=0; i

More information

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM CHAPTER 6 SQL SQL SQL 6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM 3. 1986 10 ANSI SQL ANSI X3. 135-1986

More information

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023)

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023) ( CIP) /. :, 2005. 2 ( ) ISBN 7-5624-3339-9.......... TP311. 1 CIP ( 2005) 011794 : : : : * : : 174 ( A ) :400030 : ( 023) 65102378 65105781 : ( 023) 65103686 65105565 : http: / /www. cqup. com. cn : fxk@cqup.

More information

Ζ # % & ( ) % + & ) / 0 0 1 0 2 3 ( ( # 4 & 5 & 4 2 2 ( 1 ) ). / 6 # ( 2 78 9 % + : ; ( ; < = % > ) / 4 % 1 & % 1 ) 8 (? Α >? Β? Χ Β Δ Ε ;> Φ Β >? = Β Χ? Α Γ Η 0 Γ > 0 0 Γ 0 Β Β Χ 5 Ι ϑ 0 Γ 1 ) & Ε 0 Α

More information

Improved Preimage Attacks on AES-like Hash Functions: Applications to Whirlpool and Grøstl

Improved Preimage Attacks on AES-like Hash Functions: Applications to Whirlpool and Grøstl SKLOIS (Pseudo) Preimage Attack on Reduced-Round Grøstl Hash Function and Others Shuang Wu, Dengguo Feng, Wenling Wu, Jian Guo, Le Dong, Jian Zou March 20, 2012 Institute. of Software, Chinese Academy

More information

Open topic Bellman-Ford算法与负环

Open topic   Bellman-Ford算法与负环 Open topic Bellman-Ford 2018 11 5 171860508@smail.nju.edu.cn 1/15 Contents 1. G s BF 2. BF 3. BF 2/15 BF G Bellman-Ford false 3/15 BF G Bellman-Ford false G c = v 0, v 1,..., v k (v 0 = v k ) k w(v i 1,

More information

ebook45-5

ebook45-5 5 S Q L SQL Server 5.1 5-1 SQL Server 5-1 A B S A C O S A S I N ATA N AT N 2 C E I L I N G C O S C O T D E G R E E S E X P F L O O R L O G L O G 10 P I P O W E R R A D I A N S R A N D R O U N D S I G N

More information

VHDL(Statements) (Sequential Statement) (Concurrent Statement) VHDL (Architecture)VHDL (PROCESS)(Sub-program) 2

VHDL(Statements) (Sequential Statement) (Concurrent Statement) VHDL (Architecture)VHDL (PROCESS)(Sub-program) 2 VHDL (Statements) VHDL(Statements) (Sequential Statement) (Concurrent Statement) VHDL (Architecture)VHDL (PROCESS)(Sub-program) 2 (Assignment Statement) (Signal Assignment Statement) (Variable Assignment

More information

K301Q-D VRT中英文说明书141009

K301Q-D VRT中英文说明书141009 THE INSTALLING INSTRUCTION FOR CONCEALED TANK Important instuction:.. Please confirm the structure and shape before installing the toilet bowl. Meanwhile measure the exact size H between outfall and infall

More information

C/C++ - 字符串与字符串函数

C/C++ - 字符串与字符串函数 C/C++ Table of contents 1. 2. 3. 4. 1 char C 2 char greeting [50] = " How " " are " " you?"; char greeting [50] = " How are you?"; 3 printf ("\" Ready, go!\" exclaimed John."); " Ready, go!" exclaimed

More information

2/80 2

2/80 2 2/80 2 3/80 3 DSP2400 is a high performance Digital Signal Processor (DSP) designed and developed by author s laboratory. It is designed for multimedia and wireless application. To develop application

More information

untitled

untitled Fortran Chapter 7 Subroutine ( ) and Function 7-1 subroution 行 不 行 來 行 The general form of a subroutine is subroutine subroutine_name ( argument_list) (Declaration section) (Execution section) retrun end

More information

技 巧 5: 避 免 除 以 0 的 運 算 在 做 除 的 運 算 時, 先 檢 查 除 數 的 數 值, 避 免 有 除 以 0 的 情 況 若 運 算 中 除 數 為 0,SAS 會 在 LOG 中 註 記 提 醒 並 將 運 算 結 果 設 定 為 遺 漏 值, 減 慢 程 式 的 執 行

技 巧 5: 避 免 除 以 0 的 運 算 在 做 除 的 運 算 時, 先 檢 查 除 數 的 數 值, 避 免 有 除 以 0 的 情 況 若 運 算 中 除 數 為 0,SAS 會 在 LOG 中 註 記 提 醒 並 將 運 算 結 果 設 定 為 遺 漏 值, 減 慢 程 式 的 執 行 提 升 SAS 效 率 的 小 技 巧 ( 二 ) 統 計 分 析 師 嚴 友 君 在 使 用 SAS 的 時 候, 效 率 的 考 量 除 了 程 式 運 行 的 時 間, 還 包 括 資 料 佔 用 的 空 間 暫 存 記 憶 體 的 使 用 量 程 式 的 長 度 與 易 讀 性 等 等 以 下 介 紹 一 些 初 學 者 容 易 應 用, 且 在 討 論 使 用 SAS 處 理 分 析 資

More information

Microsoft PowerPoint - OPVB1基本VB.ppt

Microsoft PowerPoint - OPVB1基本VB.ppt 大 綱 0.VB 能 做 什 麼? CH1 VB 基 本 認 識 1.VB 歷 史 與 版 本 2.VB 環 境 簡 介 3. 即 時 運 算 視 窗 1 0.VB 能 做 什 麼? Visual Basic =>VB=> 程 式 設 計 語 言 => 設 計 程 式 設 計 你 想 要 的 功 能 的 程 式 自 動 化 資 料 庫 計 算 模 擬 遊 戲 網 路 監 控 實 驗 輔 助 自 動

More information

! # % & ( & # ) +& & # ). / 0 ) + 1 0 2 & 4 56 7 8 5 0 9 7 # & : 6/ # ; 4 6 # # ; < 8 / # 7 & & = # < > 6 +? # Α # + + Β # Χ Χ Χ > Δ / < Ε + & 6 ; > > 6 & > < > # < & 6 & + : & = & < > 6+?. = & & ) & >&

More information

投影片 1

投影片 1 Coherence ( ) Temporal Coherence Michelson Interferometer Spatial Coherence Young s Interference Spatiotemporal Coherence 參 料 [1] Eugene Hecht, Optics, Addison Wesley Co., New York 2001 [2] W. Lauterborn,

More information

C C

C C C C 2017 3 8 1. 2. 3. 4. char 5. 2/101 C 1. 3/101 C C = 5 (F 32). 9 F C 4/101 C 1 // fal2cel.c: Convert Fah temperature to Cel temperature 2 #include 3 int main(void) 4 { 5 float fah, cel; 6 printf("please

More information

Java java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0,

Java java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0, http://debut.cis.nctu.edu.tw/~chi Java java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0, : POSITIVE_INFINITY NEGATIVE_INFINITY

More information

untitled

untitled Co-integration and VECM Yi-Nung Yang CYCU, Taiwan May, 2012 不 列 1 Learning objectives Integrated variables Co-integration Vector Error correction model (VECM) Engle-Granger 2-step co-integration test Johansen

More information

!! # % & ( )!!! # + %!!! &!!, # ( + #. ) % )/ # & /.

!! # % & ( )!!! # + %!!! &!!, # ( + #. ) % )/ # & /. ! # !! # % & ( )!!! # + %!!! &!!, # ( + #. ) % )/ # & /. #! % & & ( ) # (!! /! / + ) & %,/ #! )!! / & # 0 %#,,. /! &! /!! ) 0+(,, # & % ) 1 # & /. / & %! # # #! & & # # #. ).! & #. #,!! 2 34 56 7 86 9

More information

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f 27 1 Vol.27 No.1 CEMENTED CARBIDE 2010 2 Feb.2010!"!!!!"!!!!"!" doi:10.3969/j.issn.1003-7292.2010.01.011 OPC 1 1 2 1 (1., 412008; 2., 518052), OPC, WinCC VB,,, OPC ; ;VB ;WinCC Application of OPC Technology

More information

Π Ρ! #! % & #! (! )! + %!!. / 0% # 0 2 3 3 4 7 8 9 Δ5?? 5 9? Κ :5 5 7 < 7 Δ 7 9 :5? / + 0 5 6 6 7 : ; 7 < = >? : Α8 5 > :9 Β 5 Χ : = 8 + ΑΔ? 9 Β Ε 9 = 9? : ; : Α 5 9 7 3 5 > 5 Δ > Β Χ < :? 3 9? 5 Χ 9 Β

More information

Microsoft PowerPoint - STU_EC_Ch04.ppt

Microsoft PowerPoint - STU_EC_Ch04.ppt 樹德科技大學資訊工程系 Chapter 4: Boolean Algebra and Logic Simplification Shi-Huang Chen Fall 200 Outline Boolean Operations and Expressions Laws and Rules of Boolean Algebra DeMorgan's Theorems Boolean Analysis

More information

(Guangzhou) AIT Co, Ltd V 110V [ ]! 2

(Guangzhou) AIT Co, Ltd V 110V [ ]! 2 (Guangzhou) AIT Co, Ltd 020-84106666 020-84106688 http://wwwlenxcn Xi III Zebra XI III 1 (Guangzhou) AIT Co, Ltd 020-84106666 020-84106688 http://wwwlenxcn 230V 110V [ ]! 2 (Guangzhou) AIT Co, Ltd 020-84106666

More information

ICD ICD ICD ICD ICD

ICD ICD ICD ICD ICD MPLAB ICD2 MPLAB ICD2 PIC MPLAB-IDE V6.0 ICD2 usb PC RS232 MPLAB IDE PC PC 2.0 5.5V LED EEDATA MPLAB ICD2 Microchip MPLAB-IDE v6.0 Windows 95/98 Windows NT Windows 2000 www.elc-mcu.com 1 ICD2...4 1.1 ICD2...4

More information

LEETCODE leetcode.com 一 个 在 线 编 程 网 站, 收 集 了 IT 公 司 的 面 试 题, 包 括 算 法, 数 据 库 和 shell 算 法 题 支 持 多 种 语 言, 包 括 C, C++, Java, Python 等 2015 年 3 月 份 加 入 了 R

LEETCODE leetcode.com 一 个 在 线 编 程 网 站, 收 集 了 IT 公 司 的 面 试 题, 包 括 算 法, 数 据 库 和 shell 算 法 题 支 持 多 种 语 言, 包 括 C, C++, Java, Python 等 2015 年 3 月 份 加 入 了 R 用 RUBY 解 LEETCODE 算 法 题 RUBY CONF CHINA 2015 By @quakewang LEETCODE leetcode.com 一 个 在 线 编 程 网 站, 收 集 了 IT 公 司 的 面 试 题, 包 括 算 法, 数 据 库 和 shell 算 法 题 支 持 多 种 语 言, 包 括 C, C++, Java, Python 等 2015 年 3 月 份

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

ii

ii i ii iii iv Abstract This senior project is to use compute simulation to accomplish analysis and synthesis of Cam. The object of these focuses on three major partsthe first one is to establish the mathematical

More information

《分析化学辞典》_数据处理条目_1.DOC

《分析化学辞典》_数据处理条目_1.DOC 3 4 5 6 7 χ χ m.303 B = f log f log C = m f = = m = f m C = + 3( m ) f = f f = m = f f = n n m B χ α χ α,( m ) H µ σ H 0 µ = µ H σ = 0 σ H µ µ H σ σ α H0 H α 0 H0 H0 H H 0 H 0 8 = σ σ σ = ( n ) σ n σ /

More information

1.ai

1.ai HDMI camera ARTRAY CO,. LTD Introduction Thank you for purchasing the ARTCAM HDMI camera series. This manual shows the direction how to use the viewer software. Please refer other instructions or contact

More information

C/C++语言 - 分支结构

C/C++语言 - 分支结构 C/C++ Table of contents 1. if 2. if else 3. 4. 5. 6. continue break 7. switch 1 if if i // colddays.c: # include int main ( void ) { const int FREEZING = 0; float temperature ; int cold_ days

More information

untitled

untitled MODBUS 1 MODBUS...1 1...4 1.1...4 1.2...4 1.3...4 1.4... 2...5 2.1...5 2.2...5 3...6 3.1 OPENSERIAL...6 3.2 CLOSESERIAL...8 3.3 RDMULTIBIT...8 3.4 RDMULTIWORD...9 3.5 WRTONEBIT...11 3.6 WRTONEWORD...12

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

els0xu_zh_nf_v8.book Page Wednesday, June, 009 9:5 AM ELS-0/0C.8

els0xu_zh_nf_v8.book Page Wednesday, June, 009 9:5 AM ELS-0/0C.8 els0xu_zh_nf_v8.book Page Wednesday, June, 009 9:5 AM ELS-0/0C.8 Yamaha ELS-0/0C..8 LCD ELS-0/0C v. typeu LCD ELS-0/0C typeu / -6 / [SEARCH] / - ZH ELS-0/0C.8 els0xu_zh_nf_v8.book Page Wednesday, June,

More information

! # % & # % & ( ) % % %# # %+ %% % & + %, ( % % &, & #!.,/, % &, ) ) ( % %/ ) %# / + & + (! ) &, & % & ( ) % % (% 2 & % ( & 3 % /, 4 ) %+ %( %!

! # % & # % & ( ) % % %# # %+ %% % & + %, ( % % &, & #!.,/, % &, ) ) ( % %/ ) %# / + & + (! ) &, & % & ( ) % % (% 2 & % ( & 3 % /, 4 ) %+ %( %! ! # # % & ( ) ! # % & # % & ( ) % % %# # %+ %% % & + %, ( % % &, & #!.,/, % &, ) ) ( % %/ ) 0 + 1 %# / + & + (! ) &, & % & ( ) % % (% 2 & % ( & 3 % /, 4 ) %+ %( %! # ( & & 5)6 %+ % ( % %/ ) ( % & + %/

More information

a b c d e f g C2 C1 2

a b c d e f g C2 C1 2 a b c d e f g C2 C1 2 IN1 IN2 0 2 to 1 Mux 1 IN1 IN2 0 2 to 1 Mux 1 Sel= 0 M0 High C2 C1 Sel= 1 M0 Low C2 C1 1 to 2 decoder M1 Low 1 to 2 decoder M1 High 3 BCD 1Hz clk 64Hz BCD 4 4 0 1 2 to 1 Mux sel 4

More information

SDP 1 2 3 4 8 9 10 12 19

SDP 1 2 3 4 8 9 10 12 19 SDP SDP 1 2 3 4 8 9 10 12 19 SDP 2 SDP CANBUS 3m/s 48 1 2 N 3 4 5 6 7 8 9 EMC EMC ENS008212 EN618003 10 IP21 SDP 3 1 1 4 2 5 3 P24 103 104 N24 G24 P24 101 102 N24 G24 J2 J3 n P2 P1 P3 J2 J1 J3 1 P2 P1

More information

Perl

Perl Perl 磊 Goal Introduction The first perl program Basical coding style Variable Data structure Control structure Regular expression Lab Reference Outline The first perl program Just type this following string

More information

pair path pair path numeric sind cosd pair color beginfig(0) u := 2cm ; pair a ; draw ( 0u, 0u ) -- ( u, u ) ; draw ( u, 0u ) -- ( 0u, 1u ) ;

pair path pair path numeric sind cosd pair color beginfig(0) u := 2cm ; pair a ; draw ( 0u, 0u ) -- ( u, u ) ; draw ( u, 0u ) -- ( 0u, 1u ) ; 12 22 METAPOST 1 METAPOST ps TEX METAPOST 1. METAPOST 2. METAPOST mpost.exe 3. TEX dvi ps pdf [1] METAPOST beginfig(0) path pp ; u := 2cm ; Angle := 10 ; n = 360 / Angle ; pp := (-u,-u )--(-u,u )--(u,u

More information

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING 前言 - Andrew Payne 目录 1 2 Firefly Basics 3 COMPONENT TOOLBOX 目录 4 RESOURCES 致谢

More information

untitled

untitled 數 Quadratic Equations 數 Contents 錄 : Quadratic Equations Distinction between identities and equations. Linear equation in one unknown 3 ways to solve quadratic equations 3 Equations transformed to quadratic

More information

epub 94-3

epub 94-3 3 A u t o C A D L AY E R L I N E T Y P E O S N A P S T Y L E X R E F - AutoLISP Object ARX A u t o C A D D C L A u t o C A D A u t o d e s k P D B D C L P D B D C L D C L 3.1 Wi n d o w s A u t o C A D

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes Fortran Algol Pascal Modula-2 BCPL C Simula SmallTalk C++ Ada Java C# C Fortran 5.1 message A B 5.2 1 class Vehicle subclass Car object mycar public class Vehicle extends Object{ public int WheelNum

More information

<4D6963726F736F667420506F776572506F696E74202D20B5DAD2BBD5C228B4F2D3A1B0E6292E707074205BBCE6C8DDC4A3CABD5D>

<4D6963726F736F667420506F776572506F696E74202D20B5DAD2BBD5C228B4F2D3A1B0E6292E707074205BBCE6C8DDC4A3CABD5D> Homeworks ( 第 三 版 ):.4 (,, 3).5 (, 3).6. (, 3, 5). (, 4).4.6.7 (,3).9 (, 3, 5) Chapter. Number systems and codes 第 一 章. 数 制 与 编 码 . Overview 概 述 Information is of digital forms in a digital system, and

More information

Microsoft Word - InoTouch Editor编程软件手册2012.2.10.doc

Microsoft Word - InoTouch Editor编程软件手册2012.2.10.doc 目 录 第 一 章 关 于 InoTouch Editor 编 程 软 件 的 安 装... - 6-1.1 InoTouch 系 列 HMI 和 InoTouch Editor 软 件 的 简 介... - 6-1.2 安 装 InoTouch Editor 编 程 软 件... - 10-1.3 系 统 连 接 图... - 12-1.4 InoTouch 系 列 人 机 界 面 的 系 统 设

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

C/C++程序设计 - 字符串与格式化输入/输出

C/C++程序设计 - 字符串与格式化输入/输出 C/C++ / Table of contents 1. 2. 3. 4. 1 i # include # include // density of human body : 1. 04 e3 kg / m ^3 # define DENSITY 1. 04 e3 int main ( void ) { float weight, volume ; int

More information

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更 AX5000 Version 1.0 2006 年 9 錄...1 說...2 說...3...4 說...5 六...6 6.1 率...7 6.2 POST PAY...8 6.3 PREPAY DEPOSIT...9 6.4...10 6.5...11 更...12...12 LCD IC LED Flash 更 兩 RJ11 ( ) DC ON OFF ON 狀 狀 更 OFF 復 狀 說

More information

TC35短信发送程序设计

TC35短信发送程序设计 http://www.dragonsoft.net.cn/down/project/tc35_sms.rar TC35 AT /down/book/tc35_at.pdf TC35/TC35i GSM Modem TC35 GSM POS COM SIM DOWN COM E, vbcr AT VB6.0 1)C# http://www.yesky.com/softchannel/72342380468109312/20040523/1800310.shtml,

More information

,768 32,767 32K JMP Jnnn (386+) LOOP CALL [Label:] JMP short/near/far address L10: jmp jmp L20: L10 L20

,768 32,767 32K JMP Jnnn (386+) LOOP CALL [Label:] JMP short/near/far address L10: jmp jmp L20: L10 L20 (Jump) (Loop) (Conditional jump) CMP CALL AND SAR/SHR TEST JMP NOT SAL/SHL Jnnn* OR RCR/ROR LOOP XOR RCL/ROL RETn * nnn, JNE JL -128 127-32,768 32,767 32K JMP Jnnn (386+) LOOP CALL [Label:] JMP short/near/far

More information

SuperMap 系列产品介绍

SuperMap 系列产品介绍 wuzhihong@scu.edu.cn 3 / 1 / 16 / John M. Yarbrough: Digital Logic Applications and Design + + 30% 70% 1 CHAPTER 1 Digital Concepts and Number Systems 1.1 Digital and Analog: Basic Concepts P1 1.1 1.1

More information

Ρ Τ Π Υ 8 ). /0+ 1, 234) ς Ω! Ω! # Ω Ξ %& Π 8 Δ, + 8 ),. Ψ4) (. / 0+ 1, > + 1, / : ( 2 : / < Α : / %& %& Ζ Θ Π Π 4 Π Τ > [ [ Ζ ] ] %& Τ Τ Ζ Ζ Π

Ρ Τ Π Υ 8 ). /0+ 1, 234) ς Ω! Ω! # Ω Ξ %& Π 8 Δ, + 8 ),. Ψ4) (. / 0+ 1, > + 1, / : ( 2 : / < Α : / %& %& Ζ Θ Π Π 4 Π Τ > [ [ Ζ ] ] %& Τ Τ Ζ Ζ Π ! # % & ( ) + (,. /0 +1, 234) % 5 / 0 6/ 7 7 & % 8 9 : / ; 34 : + 3. & < / = : / 0 5 /: = + % >+ ( 4 : 0, 7 : 0,? & % 5. / 0:? : / : 43 : 2 : Α : / 6 3 : ; Β?? : Α 0+ 1,4. Α? + & % ; 4 ( :. Α 6 4 : & %

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

PTS7_Manual.PDF

PTS7_Manual.PDF User Manual Soliton Technologies CO., LTD www.soliton.com.tw - PCI V2.2. - PCI 32-bit / 33MHz * 2 - Zero Skew CLK Signal Generator. - (each Slot). -. - PCI. - Hot-Swap - DOS, Windows 98/2000/XP, Linux

More information

&! +! # ## % & #( ) % % % () ) ( %

&! +! # ## % & #( ) % % % () ) ( % &! +! # ## % & #( ) % % % () ) ( % &! +! # ## % & #( ) % % % () ) ( % ,. /, / 0 0 1,! # % & ( ) + /, 2 3 4 5 6 7 8 6 6 9 : / ;. ; % % % % %. ) >? > /,,

More information

Microsoft PowerPoint - Eisenstein_ABET_Presentation_Beijing_Oct_2007-Chinese.ppt [兼容模式]

Microsoft PowerPoint - Eisenstein_ABET_Presentation_Beijing_Oct_2007-Chinese.ppt [兼容模式] Bruce Eisenstein 博 士 是 Drexel 大 学 电 气 和 计 算 机 工 程 系 的 Arthur J. Rowland 教 授, 同 时 是 电 气 和 计 算 机 工 程 系 的 前 任 系 主 任 (1980-1995) 他 是 一 个 受 尊 敬 的 IEEE 的 领 导 者, 在 2000 年 担 任 IEEE 的 主 席 在 担 任 主 席 以 前,Eisenstein

More information

Monetary Policy Regime Shifts under the Zero Lower Bound: An Application of a Stochastic Rational Expectations Equilibrium to a Markov Switching DSGE

Monetary Policy Regime Shifts under the Zero Lower Bound: An Application of a Stochastic Rational Expectations Equilibrium to a Markov Switching DSGE Procedure of Calculating Policy Functions 1 Motivation Previous Works 2 Advantages and Summary 3 Model NK Model with MS Taylor Rule under ZLB Expectations Function Static One-Period Problem of a MS-DSGE

More information

穨2700使用手冊.doc

穨2700使用手冊.doc Keithley 2700 13 CH Avg Ratio continuity Offset Compensation Ohms 80 (differential) 6 (22 ) (Half-rack size) 1000V/3A isolation/input 50000 EEE-488 RS-232 Digital I/O Trigger Link ActiveX Start-up software

More information

C

C C 2017 4 1 1. 2. while 3. 4. 5. for 6. 2/161 C 7. 8. (do while) 9. 10. (nested loop) 11. 12. 3/161 C 1. I 1 // summing.c: 2 #include 3 int main(void) 4 { 5 long num; 6 long sum = 0L; 7 int status;

More information

untitled

untitled 說 參 例 邏 邏 1. 說 2. 數 數 3. 8 4. 理念 李 龍老 立 1. 理 料 2. 理 料 3. 數 料 4. 流 邏 念 5. 良 6. 讀 行 行 7. 行 例 來 邏 1. 說 說 識 量 2. 說 理 類 3. 數 數 念 4. 令 5. 良 6. 流 邏 念 7. 說 邏 理 力 1. 2. 3. 4. 5. 列 念 1 參 1. ( Visual Basic 例 ) (1)

More information

第5章修改稿

第5章修改稿 (Programming Language), ok,, if then else,(), ()() 5.0 5.0.0, (Variable Declaration) var x : T x, T, x,,,, var x : T P = x, x' : T P P, () var x:t P,,, yz, var x : int x:=2. y := x+z = x, x' : int x' =2

More information

CH01.indd

CH01.indd 3D ios Android Windows 10 App Apple icloud Google Wi-Fi 4G 1 ( 3D ) 2 3 4 5 CPU / / 2 6 App UNIX OS X Windows Linux (ios Android Windows 8/8.1/10 BlackBerry OS) 7 ( ZigBee UWB) (IEEE 802.11/a/b/g/n/ad/ac

More information

Microsoft Word - template.doc

Microsoft Word - template.doc HGC efax Service User Guide I. Getting Started Page 1 II. Fax Forward Page 2 4 III. Web Viewing Page 5 7 IV. General Management Page 8 12 V. Help Desk Page 13 VI. Logout Page 13 Page 0 I. Getting Started

More information

9 : : ; 7 % 8

9 : : ; 7 % 8 ! 0 4 1 % # % & ( ) # + #, ( ) + ) ( ). / 2 3 %! 5 6 7! 8 6 7 5 9 9 : 6 7 8 : 17 8 7 8 ; 7 % 8 % 8 ; % % 8 7 > : < % % 7! = = = : = 8 > > ; 7 Ε Β Β % 17 7 :! # # %& & ( ) + %&, %& ) # 8. / 0. 1 2 3 4 5

More information

C++ 程式設計

C++ 程式設計 C C 料, 數, - 列 串 理 列 main 數串列 什 pointer) 數, 數, 數 數 省 不 不, 數 (1) 數, 不 數 * 料 * 數 int *int_ptr; char *ch_ptr; float *float_ptr; double *double_ptr; 數 (2) int i=3; int *ptr; ptr=&i; 1000 1012 ptr 數, 數 1004

More information

Microsoft PowerPoint - STU_EC_Ch08.ppt

Microsoft PowerPoint - STU_EC_Ch08.ppt 樹德科技大學資訊工程系 Chapter 8: Counters Shi-Huang Chen Fall 2010 1 Outline Asynchronous Counter Operation Synchronous Counter Operation Up/Down Synchronous Counters Design of Synchronous Counters Cascaded Counters

More information

Microsoft Word - Final Exam Review Packet.docx

Microsoft Word - Final Exam Review Packet.docx Do you know these words?... 3.1 3.5 Can you do the following?... Ask for and say the date. Use the adverbial of time correctly. Use Use to ask a tag question. Form a yes/no question with the verb / not

More information