![]() |
![]() |
|
- go over course-info - languages; examples: enscript -o foo.ps (wimpout.ps) also, sh: Example: cd ~/Unix find . -name \*.ps -print find . -name \*.ps -print | grep -i wimpout - How to call a function: Java: obj.meth(...) class.meth(...) meth(...) new ClassName(...) a + b !a arr[i] Cf. List.get(i) arr[i] = ... Cf. List.set(i,...) - Left with the question: pros/cons of having operators, as distinct from functions? - pro: more natural for human readers - con: a different syntax (harder for compiler-writer; learning?) - con: requires(?) that those characters are reserved - con: 37 operators with 14 levels of precedence: http://www.cs.wisc.edu/~willb/cs302/java-operator-precedence.pdf 2.0-1.1 25*(7/25) - Scheme overview: - Values: 2, 3.8, #i3.8, "hello", 'orange, >insert-image; true, false (symbols are like enumerated types)define-struct dillo [length, name, is-alive?], boa [length, color] (define-struct cat (name age high-on-catnip?)) (can-carry? bo)
(Got to here)
- Placeholders (define a 4.2) (define z 2.7) (define ufo >insert-image) - expressions (/ (+ (- b) (sqrt (- (* b b) (* 4 a c)))) (* 2 a))
©2008, Ian Barland, Radford University Last modified 2008.Sep.06 (Sat) |
Please mail any suggestions (incl. typos, broken links) to ibarland ![]() |
![]() |