Size: px
Start display at page:

Download "2 2.3.1................................. 15 2.3.2............................... 15 2.3.3................................. 15 2.3.4..................."

Transcription

1 PostScript Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License. 1 PostScript PostScript PostScript Ghostscript Ghostscript Ghostscript PostScript

2

3 PostScript

4 DSC DSC DSC DSC DSC EPS EPS EPS

5 5 1 PostScript 1.1 PostScript PostScript PostScript PostScript (page description language) LIPS (NEC) NPDL ESC/Page PRE- SCRIBE Hewlett-Packard Company HP PCL PostScript Adobe Systems Incorporated (program) (programming language) Pascal C Java Scheme ML Erlang Smalltalk Ruby Prolog PostScript PostScript PostScript PostScript (machine language) (language processor) (compiler) (interpreter) PostScript PostScript PostScript (PostScript printer) PostScript PostScript PostScript Ghostscript PostScript PostScript PostScript

6 6 1 PostScript 1.2 Ghostscript Ghostscript Ghostscript Ghostscript 1 Windows gswin32 Linux gs Ghostscript GS> PostScript Ghostscript Ghostscript Ghostscript quit Ghostscript Ghostscript (1) (2) (3) PostScript Ghostscript Ghostscript PostScript == == 437 == Ghostscript GS>437 == 437 GS>_ Ghostscript PostScript add sub mul div 1 Windows (cmd.exe) Linux bash

7 1.2. Ghostscript 7 == == 5 3 add == 5 3 Ghostscript GS>5 3 add == 8 GS>_ Ghostscript sample.ps sample.ps 437 == PostScript PostScript PostScript.ps PostScript ( ) run PostScript sample.ps Ghostscript (sample.ps) run GS>(sample.ps) run 437 GS>_ Ghostscript (image window) PostScript Ghostscript newpath moveto lineto stroke showpage

8 8 1 PostScript Ghostscript sample2.ps Ghostscript sample2.ps newpath moveto lineto stroke showpage GSview GSview Ghostscript GSview sample2.ps GSview PostScript (space) (null character) (tab) (line feed) (carriage return) (form feed) (whitespace) ({ }) ( [ ] ) (separator) PostScript (token) 5 3 add == 5 3 add == add == 5 3 add == (comment)

9 PostScript ( % ) 5 3 add == % I am a comment. I am a comment. (comment out) PostScript add (postfix notation) (reverse Polish notation) add 5 3 (prefix notation) (Polish notation) 5 add 3 (infix notation) PostScript (stack) (push) (pop) (last in, first out) (first in, last out) PostScript (operand stack) PostScript

10 10 1 PostScript PostScript (object) (executable object) (literal object) PostScript PostScript (operator) 1.2 == add PostScript (procedure) PostScript PostScript PostScript 437 == PostScript 437 == 1 == Ghostscript Ghostscript GS> GS<4>_ 4 == GS<4>== 380 GS<3>_

11 add sub mul div add Ghostscript GS>5 3 add GS<1>_ 1 == GS<1>== 8 GS>_ PostScript add 7 mul (1) 5 (2) 3 (3) add (8) (4) 7 (5) mul (56) mul sub (1) 100 (2) 5 (3) 9 (4) mul (45) (5) sub (55) (operand)

12 12 2 PostScript (result) operand 1 operand 2 operand n name result 1 result 2 result n operand 1 operand 2 operand n operand n name result 1 result 2 result n result n add num 1 num 2 add sum 0 ( ) rand 0 rand int == 0 any == clear any 1 any n clear 2 PostScript (number) PostScript (integer) (floating point number) ( - ) # 2# #377 16#ff

13 (. ) 1 10 ( - ) a e b a 10 b -3.71e (arithmetic exec) num 1 num 2 add sum num 1 num 2 num 1 num 2 sub difference num 1 num 2 num 1 num 2 mul mul num 1 num 2 num 1 num 2 div quotient num 1 num 2 int 1 int 2 idiv quotient int 1 int 2 int 1 int 2 mod remainder int 1 int 2 num 1 abs num 2 num 1 num 1 neg num 2 num 1 num 1 ceiling num 2 num 1 num 1 floor num 2 num 1 num 1 round num 2 num 1 num 1 truncate num 2 num 1 ceiling floor round trancate ceiling 4.0 num sqrt real num angle sin real angle angle cos real angle num den atan angle num/den num/den sin cos atan (degree)

14 14 2 PostScript base exponent exp real base exponent base exponent num ln real num e = num num log real num 10 num rand int int srand int rrand int srand (name) == add sub (bind) PostScript namako uso daigen uni@tako $ daigen $827 3e8 / ( ) < > { } [ ] namako Namako NAMAKO PostScript ( / ) namako /namako GS>/namako == /namako def name any name any def

15 def name any /namako 718 def namako 718 GS>/namako 718 def GS>namako == 718 def 2.3 GS>/umiushi 100 def GS>umiushi == 100 GS>/umiushi 200 def GS>umiushi == 200 GS>/umiushi umiushi 40 add def GS>umiushi == (string) PostScript (length) namako 6 0 (empty string) namako (namako) (a(b)c) a(b)c () == GS>(namako) == (namako) == = = GS>(namako) = namako (escape sequence)

16 16 2 PostScript ( \ ) 1 1 \t (tab) \n (line feed) \r (carriage return) \f (form feed) \b (backspace) \( \) \\ (backslash) \ddd ddd = GS>(123\n456) = GS>(abc\(def) = abc(def GS>(\141\142\143) = abc GS>(abc\ def) = abcdef ( < ) ( > ) <616263> abc 16 GS><616263> = abc GS><6d 6e 6f> = mno int string string 0 int GS>5 string == (\000\000\000\000\000) string length int string 1 ( Y= )

17 GS>(interdisciplinary) length == 17 string index get int string index 0 GS>(abcdefg) 2 get == 99 string index int put string index int GS>/s (abcdefg) def GS>s 3 42 put GS>s == (abc*efg) string index count getinterval substring string index count GS>(abcdefghijk) 3 4 getinterval == (defg) string 1 index string 2 putinterval string 1 index string 2 GS>/s (abcdefghijk) def GS>s 3 (WXYZ) putinterval GS>s == (abcwxyzhijk) string cvi int string GS>(437) cvi == 437 string cvr real string GS>(3.14) cvr == 3.14 string cvn name string GS>(namako) cvn == /namako any string cvs substring any string string GS> string cvs == (437) num radix string cvrs substring radix num string string GS> string cvrs == (FFF)

18 18 2 PostScript any 1 any n pstack any 1 any n == GS>(namako) GS<3>pstack (namako) GS<3> any 1 any n stack any 1 any n = GS>(namako) GS<3>stack namako GS<3> any pop GS> GS<2>pop GS<1>pstack 385 any 1 any n clear GS> GS<6>clear GS> any 1 any n count any 1 any n n GS> GS<6>count == 6 GS<6>

19 any dup any any GS>398 dup GS<2>pstack any n any 0 n index any n any 0 any n n n GS>(a) (b) (c) 2 index GS<4>pstack (a) (c) (b) (a) any n 1 any 0 n copy any n 1 any 0 any n 1 any 0 n n 1 GS>(a) (b) (c) 3 copy GS<6>pstack (c) (b) (a) (c) (b) (a) any 1 any 2 exch any 2 any GS>(a) (b) (c) exch GS<3>pstack (b) (c) (a) any n 1 any 0 n j roll any (j 1) mod n any 0 any n 1 any j mod n j n any n 1 any 0 j j j GS>(a) (b) (c) (d) (e) 4 3 roll GS<5>pstack (b) (e) (d) (c) (a) GS<5>clear GS>(a) (b) (c) (d) (e) 4-3 roll GS<5>pstack (d) (c) (b) (e) (a)

20 20 2 PostScript PostScript (mark) mark mark GS>mark == -markmark any 1 any n counttomark mark any 1 any n n GS>358 mark GS<6>counttomark == 4 mark any 1 any n cleartomark GS>711 mark GS<6>cleartomark GS<1>pstack PostScript (object) (executable object) (literal object) (operator) (procedure) PostScript (executable array) 0 ({ }) { 437 == } PostScript GS>{ 437 == } == {437 ==} 2.5.3

21 exec exec GS>{ 437 == } exec 437 GS>{ 5 3 add == } exec (define) (definition) /nanasen { 7000 == nanasen GS>/nanasen { 7000 == GS>nanasen 7000 run hello.ps /hello { (Hello, world!) = GS>(hello.ps) run GS>hello Hello, world! /sanbai { 3 mul sanbai 1 3 GS>/sanbai { 3 mul GS>5 sanbai == 15 GS>7 sanbai == 21 num square square num 2 square.ps /square { dup mul GS>(square.ps) run GS>7 square == 49

22 22 2 PostScript GS>0.5 square == 0.25 int sum sum 1 int sum.ps /sum { dup 1 add mul 2 idiv GS>(sum.ps) run GS>10 sum == 55 string lastchar int string lastchar.ps /lastchar { dup length 1 sub get GS>(lastchar.ps) run GS>(abcdefg) lastchar == (bind) (dictionary) (key) (value) PostScript (dictionary stack) systemdict (current dictionary) userdict def 2.2

23 key value def key value key value PostScript int dict dict int (capacity) dict begin dict GS>/namako (sea cucumber) def GS>namako == (sea cucumber) GS>1 dict begin GS>/namako 4998 def GS>namako == 4998 GS> GS>namako == (sea cucumber) int itos string int itos.ps /itos { 1 dict begin /s 1 string def s roll put s GS>(itos.ps) run

24 24 2 PostScript GS>/s (umiushi) def GS>97 itos == (a) GS>s == (umiushi) def exch namako /namako exch def exch hour minute 1 hmtom minute 2 hour minute 1 hmtom.ps /hmtom { 2 dict begin /minute exch def /hour exch def hour 60 mul minute add GS>(hmtom.ps) run GS>2 30 hmtom == (condition) (true) (false) (Boolean value) PostScript systemdict true false GS>true == true GS>false == false

25 (predicate) PostScript (relational operator) (logical operator) (equality operator) (comparison operator) (equality operator) any 1 any 2 eq bool (equal) any 1 any 2 GS>5 5 eq == true GS>5 8 eq == false any 1 any 2 ne bool (not equal) any 1 any 2 GS>(abc) (abc) ne == false GS>(abc) (abd) ne == true (comparison operator) num 1 num 2 gt bool (greater than) num 1 num 2 num 1 num 2 lt bool (less than) num 1 num 2 num 1 num 2 ge bool (greater equal) num 1 num 2 num 1 num 2 le bool (less equal) num 1 num 2 GS>5 3 gt == true GS>5 5 gt == false GS>5 8 gt == false GS>5 3 ge == true GS>5 5 ge == true GS>5 8 ge == false (lexicographical order)

26 26 2 PostScript GS>(abc) (abd) lt == true GS>(abc) (abcd) lt == true (logical operator) bool 1 bool 2 and bool 3 (conjunction) bool 1 bool 2 GS>true true and == true GS>true false and == false GS>false true and == false GS>false false and == false bool 1 bool 2 or bool 3 (disjunction) bool 1 bool 2 GS>true true or == true GS>true false or == true GS>false true or == true GS>false false or == false bool 1 bool 2 xor bool 3 (exclusive disjunction) bool 1 bool 2 GS>true true xor == false GS>true false xor == true GS>false true xor == true GS>false false xor == false bool 1 not bool 2 (negation) bool 1 GS>true not == false GS>false not == true PostScript

27 int even bool int even.ps /even { 2 mod 0 eq GS>(even.ps) run GS>6 even == true GS>7 even == false string 1 string 2 samelen bool string 1 string 2 samelen.ps /samelen { 2 dict begin /string2 exch def /string1 exch def string1 length string2 length eq GS>(samelen.ps) run GS>(namako) (hitode) samelen == true GS>(namako) (umiushi) samelen == false any 1 any 2 any 3 triple bool any 1 any 2 any 3 triple.ps /triple { 3 dict begin /any3 exch def /any2 exch def /any1 exch def any1 any2 eq any1 any3 eq and GS>(a) (a) (a) triple == true GS>(a) (a) (b) triple == false (selection)

28 28 2 PostScript PostScript ifelse if bool proc 1 proc 2 ifelse bool proc 1 proc 2 GS>true { (It s true.) = } { (It s false.) = } ifelse It s true. GS>false { (It s true.) = } { (It s false.) = } ifelse It s false. bool proc if bool proc GS>true { (It s true.) = } if It s true. GS>false { (It s true.) = } if GS>_ num zero string num zero not zero zero.ps /zero { 0 eq { (zero) } { (not zero) } ifelse GS>(zero.ps) run GS>0 zero == (zero) GS>5 zero == (not zero) int evenodd string int even odd evenodd.ps /even { 2 mod 0 eq /evenodd { even { (even) } { (odd) } ifelse GS>(evenodd.ps) run GS>6 evenodd == (even) GS>7 evenodd == (odd) any pornot pornot.ps /empty { count 0 eq /pornot { empty not { == } if

29 GS>(pornot.ps) run GS>(abc) pornot (abc) GS>pornot GS>_ (multibranch selection) ifelse ifelse bool 1 proc 1 { bool 2 proc 2 { { bool n proc n proc n+1 ifelse }... } ifelse } ifelse bool 1 bool 2... proc n+1 GS>false { 1 } { false { 2 } { true { 3 } { 4 } ifelse } ifelse } ifelse == 3 num sign string num plus minus zero sign.ps /sign { 1 dict begin /num exch def num 0 gt { (plus) } { num 0 lt { (minus) } { (zero) } ifelse } ifelse GS>(sign.ps) run GS>5 sign == (plus) GS>-5 sign == (minus) GS>0 sign == (zero)

30 30 2 PostScript (iteration) PostScript repeat for loop forall repeat int proc repeat int proc GS>5 { (namako) = } repeat namako namako namako namako namako num int power power num int num int (num int ) power.ps /power { 3 dict begin /int exch def /num exch def /p 1 def int { /p p num mul def } repeat p GS>(power.ps) run GS>3 4 power == for (control variable) 1 (value) initial increment limit proc for initial increment limit proc initial (1) (2) (3) proc (4) increment increment increment limit limit

31 GS> { == } for GS> { == } for int alldivisors int divisor.ps /divisor { mod 0 eq /alldivisors { 2 dict begin /int exch def 1 1 int { /i exch def int i divisor { i == } if } for GS>(divisor.ps) run GS>7171 alldivisors loop exit proc loop proc exit repeat for loop GS>(a) (b) (c) { count 0 eq { exit } if == } loop (c) (b) (a) n m gcm gcm n m (greatest common measure, GCM) (Euclidean algorithm) 1 n m 2 m 0 3 n m r 4 m n 5 r m 6 2 n

32 32 2 PostScript gcm.ps /gcm { 3 dict begin /m exch def /n exch def { m 0 eq { exit } if /r n m mod def /n m def /m r def } loop n GS>(gcm.ps) run GS>54 36 gcm == forall string proc forall string proc GS>(abc) { == } forall s c countc n s c countc.ps /countc { 3 dict begin /c exch def /s exch def /n 0 def s { c eq { /n n 1 add def } if } forall n GS>(countc.ps) run GS>(namamuginamagomenamatamago) (m) 0 get countc == (recursion)

33 (recursive) (recursive structure) (recursive definition) B A B A C A B C B A (basis) B A B A n n 1 n (n 1) (n 2)... 1 n (factorial) n! 0! 1 5! n! { 0! = 1 n 1 n! = n (n 1)! n fact fact n fact.ps

34 34 2 PostScript /fact { 1 dict begin /n exch def n 0 eq { 1 } { n 1 ge { n n 1 sub fact mul } { (undefined) } ifelse } ifelse GS>(fact.ps) run GS>5 fact == (Fibonacci sequence) n n (F n ) F 0 = 0 F 1 = 1 n 2 F n = F n 2 + F n n fibona fibona n n fibona.rb /fibona { 1 dict begin /n exch def n 0 eq { 0 } { n 1 eq { 1 } { n 2 ge { n 2 sub fibona n 1 sub fibona add } { (undefined) } ifelse } ifelse } ifelse GS>(fibona.ps) run GS>20 fibona == (higher-order procedure) exec ifelse if repeat for loop forall (higher-order operator)

35 exec ifelse proc twice proc twice.ps /twice { 1 dict begin /proc exch def proc proc GS>(twice.ps) run GS>{ (tanpopo) == } twice (tanpopo) (tanpopo) GS> { add } twice == PostScript load key load value key GS>/square { dup mul GS>/square load == {dup mul} (summation of sequence) n f sum sum n 1 f n f n f(i) = f(1) + f(2) + + f(n) i=1

36 36 2 PostScript 10 { } sum 10 { dup mul } sum 10 { dup dup mul mul } sum 10 i=1 10 i=1 10 i=1 sum.ps /sum { 2 dict begin /f exch def /n exch def n 1 eq { 1 f } { n 2 ge { n f n 1 sub /f load sum add } { (undefined) } ifelse } ifelse GS>(sum.ps) run GS>10 { } sum == 55 GS>10 { dup mul } sum == 385 GS>10 { dup dup mul mul } sum == 3025 i = i 2 = i 3 = (map) s 1 f maps s 2 s 1 f 1 1 s 1 f maps.ps /maps { 6 dict begin /f exch def /s1 exch def /n s1 length def /s2 n string def 0 1 n 1 sub { /i exch def /e s1 i get def s2 i e f put } for s2

37 GS>(maps.ps) run GS>(tsuyukusa) { 32 sub } maps == (TSUYUKUSA) GS>(password) { pop 42 } maps == (********) PostScript (array) 1 (element) (length) 0 (empty array) ( [ ) ( ] ) [ mark 2.4 mark mark any 1 any n ] array any 1 any n GS>[ (nazuna) true ] == [ (nazuna) true] GS>[ 5 3 add 10 mul idiv sub ] == [80 67] GS>[ 21 [ ] [ 60 [ ] 99 ] 18 ] == [21 [53 74] [60 [53 48] 99] 18] GS>[ ] == [] int array array int (null object) GS>5 array == [null null null null null] array length int array GS>[ ] length == 17 array index get int array index 0 GS>[ (a) (b) (c) (d) (e) ] 2 get == (c) array index any put

38 38 2 PostScript array index any GS>/a [ (a) (b) (c) (d) (e) ] def GS>a 3 (*) put GS>a == [(a) (b) (c) (*) (e)] array index count getinterval subarray array index count GS>[ (a) (b) (c) (d) (e) (f) (g) ] 2 4 getinterval == [(c) (d) (e) (f)] array 1 index array 2 putinterval array 1 index array 2 GS>/a [ (a) (b) (c) (d) (e) (f) (g) ] def GS>a 2 [ (X) (Y) (Z) ] putinterval GS>a == [(a) (b) (X) (Y) (Z) (f) (g)] any 0 any n 1 array astore array array array array any i i array GS>(a) (b) (c) 3 array astore == [(a) (b) (c)] array aload any 0 any n 1 array array array array GS>[ (a) (b) (c) ] aload GS<4>pstack [(a) (b) (c)] (c) (b) (a) array proc forall array proc GS>[ (a) (b) (c) ] { == } forall (a) (b) (c) a suma sum a suma.ps /suma { 2 dict begin /a exch def /sum 0 def a { /sum exch sum add def } forall sum

39 GS>(suma.ps) run GS>[ ] suma == 8765 a 1 reverse a 2 a 1 reverse.ps /reverse { 5 dict begin /a1 exch def /n a1 length def /a2 n array def 0 1 n 1 sub { /i exch def /e a1 i get def a2 n i sub 1 sub e put } for a2 GS>(reverse.ps) run GS>[ (a) (b) (c) (d) (e) ] reverse == [(e) (d) (c) (b) (a)] n f arrayf array n f n 1 f arrayf.ps /arrayf { 4 dict begin /f exch def /n exch def /a n array def 0 1 n 1 sub { /i exch def a i i f put } for a GS>(arrayf.ps) run GS>16 { dup mul } arrayf == [ ] GS>10 { 100 exch sub } arrayf == [ ] GS>8 { 2 mod 0 eq } arrayf == [true false true false true false true false] a 1 f mapa a 2 a 1 f 1 1 a 1 f

40 40 2 PostScript mapa.ps /mapa { 6 dict begin /f exch def /a1 exch def /n a1 length def /a2 n array def 0 1 n 1 sub { /i exch def /e a1 i get def a2 i e f put } for a2 GS>(mapa.ps) run GS>[ ] { 10 mul } mapa == [ ] GS>[ true false false true ] { { 1 } { 0 } ifelse } mapa == [ ] GS>[ (sakura) (ume) (mokuren) (momo) ] { length } mapa == [ ] (file object) (open) file pathname access file file access pathname (access string) r w a r+ w+ a+

41 /in (asagao.txt) (r) file def asagao.txt in (read/write position) r r+ w w+ a a+ ( of file) (close) closefile file closefile file file read int true file read false file 1 file string readline substring bool file 1 string string file string readstring substring bool file string string string string file token any true file token false file 1

42 42 2 PostScript file int write file int file string writestring file string pathname cat pathname cat.ps /cat { 3 dict begin /pathname exch def /in pathname (r) file def /s 256 string def { in s readline not { pop exit } if = } loop in closefile animal.txt armadillo kangaroo orangutan GS>(cat.ps) run GS>(animal.txt) cat armadillo kangaroo orangutan pathname 1 pathname 2 copy pathname 1 pathname 2 pathname 2 copy.ps /copy { 4 dict begin /pathname2 exch def /pathname1 exch def /in pathname1 (r) file def /out pathname2 (w) file def { in read not { exit } if out exch write } loop in closefile out closefile

43 GS>(copy.ps) run GS>(animal.txt) (animal2.txt) copy (standard IO) (standard input) (standard output) (standard error) (redirect) (redirection) == = pstack print string print string == = print print GS>(warabi) print warabigs>(warabi\n) print warabi GS>_ PostSctipt PostScript %stdin %stdout %stderr file /in (%stdin) (r) file def in GS>(copy.ps) run GS>(animal.txt) (%stdout) copy armadillo kangaroo orangutan pathname deletefile

44 44 3 PostScript pathname pathname 1 pathname 2 renamefile pathname 1 pathname 2 3 PostScript PostScript PostScript (graphics state) (graphics state stack) (current graphics state) PostScript (current page) PostScript PostScript showpage showpage (coordinate system) (axis) (origin) 2 2 x (x axis) y (y axis) (coordinate) 2 x x y y (x, y) x x (x coordinate) y y (y coordinate) 3.1.5

45 x y (default coordinate system) x y x y PostScript 72 1 (point) 1 = 72 1 = PostScript (Didot point) (Anglo-American point) 1 = = PostScript PostScript (PostScript point) DTP (DTP point) (computer point) /mm { mul 7 mm (path) (current path) (construct) (path construction operator) newpath newpath 3.2.2

46 46 3 PostScript (pen location) (current point) moveto rmoveto moveto rmoveto absolute relative moveto rmoveto x y moveto (x, y) moveto (400, 300) dx dy rmoveto x dx y dy (x, y) (x + dx, y + dy) (400, 300) rmoveto (470, 280) newpath moveto moveto rmoveto (subpath) 1 moveto rmoveto (current subpath) (paint) (stroke) (fill) (1) newpath (2) (3)

47 (4) showpage 3.3 (1) (3) (4) (line) lineto rlineto lineto rlineto x y lineto (x, y) (x, y) (400, 300) lineto (400, 300) (500, 600) (500, 600) dx dy rlineto (x, y) (x + dx, y + dy) (x + dx, y + dy) (400, 300) rlineto (400, 300) (470, 280) (470, 280) stroke stroke lineto.ps newpath moveto lineto lineto lineto stroke showpage lineto rlineto rlineto.ps newpath moveto rlineto rlineto rlineto stroke showpage

48 48 3 PostScript (line width) (thickness) 1 1 setlinewidth num setlinewidth num width.ps /hline { 2 dict begin /width exch def /y exch def newpath 100 y moveto rlineto width setlinewidth stroke }def /seventeenlines { 3 dict begin /width 4 def { /y exch def y width hline /width width 2 add def } for seventeenlines showpage (open subpath) (closed subpath) 2 (polyline) (polygon) (cap) (join) (close) closepath closepath closepath close.ps newpath moveto rlineto

49 rlineto rlineto rlineto moveto rlineto rlineto rlineto closepath 60 setlinewidth stroke showpage (stroke) (fill) stroke fill fill fill.ps newpath moveto rlineto rlineto moveto rlineto rlineto fill showpage 2 fill (insideness) PostScript (nonzero winding number rule) (even-odd rule) fill eofill fill eofill eofill eofill.ps

50 50 3 PostScript /star { 2 dict begin /y exch def /x exch def newpath x y moveto rlineto rlineto rlineto rlineto setrgbcolor star fill star eofill showpage fill eofill (current color) stroke fill (color space) PostScript (additive mixture of colors) (subtractive mixture of colors) (gray level) (red) (green) (blue) (additive mixture of colors) RGB setrgbcolor red green blue setrgbcolor red green blue 0 1 rgb.ps /hline { 5 dict begin /blue exch def /green exch def /red exch def /y exch def /x exch def newpath x y moveto 30 0 rlineto 30 setlinewidth

51 red green blue setrgbcolor stroke }def /hundredlines { 4 dict begin /red 0 def { /y exch def /green 0 def { /x exch def x y red green 0 hline /green green 0.1 add def } for /red red 0.1 add def } for hundredlines showpage (cyan) (magenta) (yellow) (black) (subtractive mixture of colors) (key tone) CMYK 1 setcmykcolor cyan magenta yellow black setcmykcolor cyan magenta yellow black 0 1 cmyk.ps /hline { 6 dict begin /black exch def /yellow exch def /magenta exch def /cyan exch def /y exch def /x exch def newpath x y moveto 30 0 rlineto 30 setlinewidth cyan magenta yellow black setcmykcolor stroke }def /hundredlines { 4 dict begin /cyan 0 def { /y exch def /magenta 0 def { /x exch def 1 K black

52 52 3 PostScript x y cyan magenta 0 0 hline /magenta magenta 0.1 add def } for /cyan cyan 0.1 add def } for hundredlines showpage (gray) (gray level) setgray num setgray num (black) 1 (white) gray.ps /dline { newpath moveto rlineto 40 setlinewidth stroke /hline { 2 dict begin /gray exch def /y exch def newpath 100 y moveto rlineto 30 setlinewidth gray setgray stroke }def /elevenlines { 3 dict begin /gray 0 def { /y exch def y gray hline /gray gray 0.1 add def } for dline elevenlines showpage 1 11

53 stroke (cap) setlinecap int setlinecap int (butt cap) 1 (round cap) 2 (projecting square cap) cap.ps /hline { 2 dict begin /cap exch def /y exch def newpath 150 y moveto rlineto 100 setlinewidth setrgbcolor cap setlinecap stroke newpath 150 y moveto rlineto 1 setlinewidth setrgbcolor 0 setlinecap stroke }def hline hline hline showpage (join) setlinejoin

54 54 3 PostScript int setlinejoin int (miter join) 1 (round join) 2 (bevel join) join.ps /harpoon { 2 dict begin /join exch def /y exch def newpath 150 y moveto rlineto rlineto 80 setlinewidth setrgbcolor join setlinejoin stroke newpath 150 y moveto rlineto rlineto 1 setlinewidth setrgbcolor 0 setlinejoin stroke }def harpoon harpoon harpoon showpage PostScript (miter length) (miter limit) setmiterlimit num setmiterlimit num num 1 miter.ps

55 /harpoon { 2 dict begin /miterlimit exch def /y exch def newpath 150 y moveto rlineto rlineto 80 setlinewidth setrgbcolor 0 setlinejoin miterlimit setmiterlimit stroke }def harpoon harpoon showpage (dashed line) (solid line) (dash pattern) (dash array) 0 [ ] [ 20 ] [ ] [ ] [ ] (dash offset) stroke setdash

56 56 3 PostScript array offset setdash array offset array 0 dash.ps /vline { newpath moveto lineto moveto lineto setrgbcolor stroke /hline { 3 dict begin /offset exch def /array exch def /y exch def newpath 100 y moveto rlineto setrgbcolor 40 setlinewidth array offset setdash stroke }def vline 700 [] 0 hline 600 [ ] 0 hline 500 [ 20 ] 0 hline 400 [ ] 0 hline 300 [ ] 0 hline 200 [ ] 20 hline showpage roudash.ps newpath moveto rlineto rlineto closepath 60 setlinewidth setrgbcolor 1 setlinecap 1 setlinejoin [200 80] 0 setdash stroke showpage (arc) 2

57 arc arcn x y r ang 1 ang 2 arc (x, y) r ang 1 ang 2 x 0 x y r ang 1 ang 2 arcn arc arc arcn arc.ps newpath arc stroke arcn stroke showpage arc arcn arc arcn arc arcn kofun.ps newpath moveto arcn lineto closepath stroke showpage arct x 1 y 1 x 2 y 2 r arct (x 1, y 1 ) (x 1, y 1 ) (x 2, y 2 ) r arct.ps newpath

58 58 3 PostScript moveto arct setrgbcolor 30 setlinewidth stroke moveto lineto lineto 1 setlinewidth setrgbcolor stroke showpage (Bézier curve) (control point) curveto x 1 y 1 x 2 y 2 x 3 y 3 curveto (x 1, y 1 ) 1 (x 2, y 2 ) 2 (x 3, y 3 ) (x 3, y 3 ) bezier.ps /bezier { 8 dict begin /y3 exch def /x3 exch def /y2 exch def /x2 exch def /y1 exch def /x1 exch def /y0 exch def /x0 exch def newpath x0 y0 moveto x1 y1 x2 y2 x3 y3 curveto setrgbcolor 40 setlinewidth stroke newpath x0 y0 moveto x1 y1 lineto x2 y2 moveto x3 y3 lineto setrgbcolor 1 setlinewidth stroke bezier

59 bezier showpage bezbez.ps /bezbez { 14 dict begin /y6 exch def /x6 exch def /y5 exch def /x5 exch def /y4 exch def /x4 exch def /y3 exch def /x3 exch def /y2 exch def /x2 exch def /y1 exch def /x1 exch def /y0 exch def /x0 exch def newpath x0 y0 moveto x1 y1 x2 y2 x3 y3 curveto x4 y4 x5 y5 x6 y6 curveto setrgbcolor 30 setlinewidth stroke newpath x0 y0 moveto x1 y1 lineto x2 y2 moveto x3 y3 lineto setrgbcolor 1 setlinewidth stroke newpath x3 y3 moveto x4 y4 lineto x5 y5 moveto x6 y6 lineto setrgbcolor stroke bezbez bezbez showpage PostScript

60 60 3 PostScript (font) PostScript (font dictionary) PostScript 3 (1) (2) (3) (font name) Times Roman Times-Roman findfont name findfont font name /Times-Roman findfont Times-Roman (size) findfont 1 scalefont font 1 scale scalefont font 2 font 1 scale /Times-Roman findfont 24 scalefont Times-Roman (current font) setfont font setfont font

61 /Times-Roman findfont 24 scalefont setfont Times-Roman moveto rmoveto rmoveto show string show string show.ps setrgbcolor /Times-Roman findfont 64 scalefont setfont moveto (I am a string.) show showpage (width of glyph) show ashow show ashow a x a y string ashow string (a x, a y ) ashow.ps /drawalphabet { 4 dict begin /ay exch def /ax exch def /y exch def /x exch def setrgbcolor /Times-Roman findfont 18 scalefont setfont x y moveto ax ay (abcdefghijklmnopqrstuvwxyz) ashow drawalphabet drawalphabet drawalphabet drawalphabet drawalphabet

62 62 3 PostScript drawalphabet showpage widthshow c x c y char string widthshow string char (c x, c y ) (word spacing) widthshow word spacing 8 wshow.ps /drawwords { 5 dict begin /char exch def /ay exch def /ax exch def /y exch def /x exch def setrgbcolor /Times-Roman findfont 18 scalefont setfont x y moveto ax ay char (one two three four five six seven) widthshow drawwords drawwords drawwords drawwords drawwords drawwords drawwords showpage Times-Roman Helvetica Courier Symbol font.ps /drawfontname { 3 dict begin /fontname exch def /y exch def /x exch def setrgbcolor fontname cvn findfont 64 scalefont setfont x y moveto fontname show (Times-Roman) drawfontname (Helvetica) drawfontname (Courier) drawfontname (Symbol) drawfontname showpage

63 Ryumin-Light-RKSJ-H Ryumin-Light-RKSJ-V GothicBBB-Medium-RKSJ-H GothicBBB-Medium-RKSJ-V Shift JIS RKSJ EUC EUC-JP PostScript ( ) 7 PostScript <93fa 967b 8cea 82cc 95b6 8e9a 97f1> 16 nihongo.ps /drawnihongo { 3 dict begin /fontname exch def /y exch def /x exch def setrgbcolor fontname findfont 64 scalefont setfont x y moveto <90bc ec 95fb> show /Ryumin-Light-RKSJ-H drawnihongo /GothicBBB-Medium-RKSJ-H drawnihongo /Ryumin-Light-RKSJ-V drawnihongo /GothicBBB-Medium-RKSJ-V drawnihongo showpage (alignment) (flush left) (flush right) (centering) show x stringwidth string stringwidth w x w y string w x x w y y

64 64 3 PostScript align.ps /flushleft { 3 dict begin /string exch def /y exch def /x exch def x y moveto string show /flushright { 3 dict begin /string exch def /y exch def /x exch def x y moveto string stringwidth pop neg 0 rmoveto string show /centering { 3 dict begin /string exch def /y exch def /x exch def x y moveto string stringwidth pop neg 2 div 0 rmoveto string show /threestrings { 4 dict begin /proc exch def /dy exch def /y exch def /x exch def x y moveto x y (hotokenoza) proc x y dy sub (renge) proc x y dy 2 mul sub (nanohana) proc /Times-Roman findfont 24 scalefont setfont setrgbcolor { flushleft } threestrings { flushright } threestrings { centering } threestrings showpage show charpath string bool charpath string bool

65 charpath.ps newpath /Times-Roman findfont 230 scalefont setfont setrgbcolor 3 setlinewidth moveto (char) false charpath stroke /Ryumin-Light-RKSJ-V findfont 320 scalefont setfont moveto <95b6 8e9a> false charpath setrgbcolor 4 setlinewidth stroke showpage x y 1 (transformation) (translation) translate t x t y translate x t x y t y transla.ps /hline { newpath 0 0 moveto rlineto stroke /translatehline { translate 22 { hline 8 30 translate } repeat setrgbcolor 16 setlinewidth translatehline showpage (rotation) rotate

66 66 3 PostScript angle rotate angle rotate.ps /hline { newpath 60 0 moveto rlineto stroke /rotatehline { translate 36 { hline 10 rotate } repeat setrgbcolor 6 setlinewidth rotatehline showpage (scaling) (scaling factor) x y 1 1 x 2 x 1 2 scale s x s y scale x s x y s y scale.ps /hline { newpath 0 0 moveto rlineto stroke /scalehline { translate 10 { hline scale translate } repeat setrgbcolor 100 setlinewidth scalehline showpage

67 PostScript (clipping) (clip) PostScript (clipping path) (current clipping path) clip eoclip clip eoclip initclip clip eoclip initclip clip.ps /star { 2 dict begin /y exch def /x exch def newpath x y moveto rlineto rlineto rlineto rlineto /polkadot { 4 dict begin /y exch def /x exch def /dy y def 14 { /dy dy 25 add def /dx x def 14 {

68 68 3 PostScript /dx dx 25 add def newpath dx dy arc stroke } repeat } repeat /polkadotstar { star clip polkadot /polkadotstarbyeo { star eoclip polkadot setrgbcolor 6 setlinewidth polkadotstar initclip polkadotstarbyeo showpage PostScript (graphics state stack) (1) (2) (3) gsave grestore gsave grestore gsave.ps /square {

69 dict begin /y exch def /x exch def x y moveto rlineto rlineto rlineto fill /specialsquare { gsave translate 50 rotate scale setrgbcolor 0 0 square grestore setrgbcolor square specialsquare square showpage specialsquare stroke fill eofill gsave grestore filstro.ps setrgbcolor 30 setlinewidth newpath moveto rlineto rlineto rlineto closepath gsave setrgbcolor fill grestore stroke showpage gsave grestore

70 70 3 PostScript 3.12 DSC DSC PostScript (document manager) PostScript DSC PostScript DSC (Document Structuring Conventions) DSC DSC DSC (DSC comment) PostScript DSC 1 DSC 1 2 ( %% ) (comment keyword) DSC PostScript DSC EOF %%EOF DSC ( : ) DSC DSC DSC (argument) PostScript DSC Title: DSC Title: DSC DSC %%Title: (I Am a Title of This Program) DSC DSC I Am a Title of This Program DSC DSC 1.2 PostScript DSC DSC ( % ) 1 DSC PostScript DSC PostScript 1 2 DSC

71 3.12. DSC 71 DSC DSC Pages: %%Pages: %%Pages: 76 DSC DSC 76 DSC DSC Page: %%Page: DSC 0 1 %%Page: (title page for Chapter Five) 63 DSC 63 title page for Chapter Five 26 xxvi DSC %%Page: xxvi 26 showpage page.ps %%Pages: 3 /showstring { 1 dict begin /string exch def moveto setrgbcolor /Times-Roman findfont 128 scalefont setfont string show showpage %%Page: (first page) 1 (first) showstring %%Page: (second page) 2 (second) showstring %%Page: (third page) 3 (third) showstring 1 first 2 second 3 third

72 72 3 PostScript 3.13 EPS EPS EPS.eps EPS EPS EPS PostScript (Encapsulated PostScript) EPS PostScript (encapsulated) EPS PostScript EPS EPS PostScript PostScript EPS DSC EPSF-3.0 EPS showpage EPS showpage /showpage { EPS showpage (bounding box) PostScript DSC DSC (bounding box comment) BoundingBox: %%BoundingBox: llx lly urx ury llx lly urx ury 1 (llx, lly) (urx, ury) %%BoundingBox: DSC DSC PostScript (160, 140) (380, 570) EPS DSC EPS circle.eps EPSF-3.0 %%BoundingBox: newpath

73 arc closepath setrgbcolor 80 setlinewidth stroke [EPSFFS,1992] Adobe Systems Incorporated, Encapsulated PostScript File Format Specification, Version 3.0, Adobe Technical Note #5002, [PSLDSCS,1992] Adobe Systems Incorporated, PostScript Language Document Structuring Conventions Specification, Version 3.0, Adobe Technical Note #5001, [PSLPD,1988] Adobe Systems Incorporated, PostScript Language Program Design, Addison- Wesley, 1988, ISBN PostScript 1990 ISBN [PSLRM,1999] Adobe Systems Incorporated, PostScript Language Reference Manual, Third Edition, Addison-Wesley, 1999, ISBN PostScript ISBN [PSLTC,1985] Adobe Systems Incorporated, PostScript Language Tutorial and Cookbook, Addison-Wesley, 1985, ISBN PostScript 1989 ISBN [,1993] PostScript 1993 ISBN [,1997] Ghostscript Another Manual 1997 ISBN [,1997] PostScript CQ 1997 ISBN

74 74 %%BoundingBox:, 72 %%EOF, 70 %%Page:, 71 %%Pages:, 71 %%Title:, 70.eps, 72.ps, 7 =, 15, 18, 43 ==, 6, 10, 12, 15, 18, 43 [, 37 \, 16 \(, 16 \), 16 \\, 16 \b, 16 \ddd, 16 \f, 16 \n, 16 \r, 16 \t, 16 ], 37 10, 12, 13 16, 16, 63 2, 21 8, 16 a, 40 a+, 40 abs, 13 add, 6, 12, 13 Adobe Systems Incorporated, 5 aload, 38 and, 26 arc, 57 arcn, 57 arct, 57 array, 37 ashow, 61 astore, 38 atan, 13 begin, 23 C, 5 ceiling, 13 charpath, 64 clear, 12, 18 cleartomark, 20 clip, 67 closefile, 41 closepath, 48 CMYK, 51 copy, 19 cos, 13 count, 18 counttomark, 20 Courier, 62 curveto, 58 cvi, 17 cvn, 17 cvr, 17 cvrs, 17 cvs, 17 def, 14, 22 deletefile, 43 dict, 23 div, 6, 13 DSC, 70, 70 DSC, 70, 70, 70 DTP, 45 dup, 19, 23 eoclip, 67 eofill, 49, 69 EPS, 72, 72 eq, 25 Erlang, 5 ESC/Page, 5 EUC-JP, 63 exch, 19, 24 exec, 21, 34 exit, 31 exp, 14 false, 24 file, 40, 43 fill, 49, 50, 69 findfont, 60

75 75 floor, 13 for, 30, 34 forall, 30, 34, 38, 32 GCM, 31 ge, 25 get, 37, 17 getinterval, 38, 17 Ghostscript, 5, 6, 6, 6, 6 GothicBBB-Medium-RKSJ-H, 63 GothicBBB-Medium-RKSJ-V, 63 grestore, 68 gs, 6 gsave, 68 GSview, 8 gswin32, 6 gt, 25 Helvetica, 62 Hewlett-Packard Company, 5 HP PCL, 5 idiv, 13 if, 28, 34 ifelse, 28, 29, 34 index, 19 initclip, 67 Java, 5 le, 25 length, 37, 16 lineto, 47 LIPS, 5 ln, 14 load, 35 log, 14 loop, 30, 31, 34 lt, 25 mark, 20, 37 ML, 5 mod, 13 moveto, 46, 61 mul, 6, 13 ne, 25 NEC, 5 neg, 13 newpath, 45, 46 not, 26 NPDL, 5 or, 26 Pascal, 5 pop, 18 PostScript, 7, 5, 72 PostScript, 5 PostScript, 45 PRESCRIBE, 5 print, 43 Prolog, 5 pstack, 18, 43 put, 37, 17 putinterval quit, 6, 38, 17 r, 40 r+, 40 rand, 12, 14 read, 41 readline, 41 readstring, 41 renamefile, 44 repeat, 30, 34 RGB, 50 rlineto, 47 rmoveto, 46, 61 roll, 19 rotate, 66 round, 13 rrand, 14 Ruby, 5 run, 7, 21

76 76 Ryumin-Light-RKSJ-H, 63 Ryumin-Light-RKSJ-V, 63 scale, 66 scalefont, 60 Scheme, 5 setcmykcolor, 51 setdash, 56 setfont, 60 setgray, 52 setlinecap, 53 setlinejoin, 54 setlinewidth, 48 setmiterlimit, 54 setrgbcolor, 50 Shift JIS, 63 show, 61 showpage, 44, 71, 72 sin, 13 Smalltalk, 5 sqrt, 13 srand, 14 stack, 18 string, 16 stringwidth, 63 stroke, 47, 49, 50, 53, 55, 69 sub, 6, 13 Symbol, 62 systemdict, 22 Times-Roman, 60, 62 token, 41 translate, 65 true, 24 truncate, 13 userdict, 22 w, 40 w+, 40 widthshow, 62 write, 42 writestring, 42 xor, 26 x, 44 x, 44 y, 44 y, 44, 13, 50, 50, 40, 22, 30, 9, 13, 45, 51, 44, 68, 23, 46, 65, 7, 19, 44, 50, 68, 50, 5, 15, 71, 56, 57, 57, 57, 16, 62, 60, 40, 38, 17, 17, 37, 10, 20, 22, 18, 18, 19, 18, 20, 20, 11, 21, 24, 9, 18, 10, 20, 18, 28

77 , 37, 16, 41, 48, 41, 14, 12, 17, 28, 33 Ghostscript, 6, 13, 8, 16, 16, 9, 5, 5, 46, 33, 49, 67, 27, 28, 30, 37, 65, 8, 16, 8, 71, 15, 8, 44 EPS, 72, 68, 8, 68, 44, 68, 66, 60, 66, 30, 30, 31, 30 PostScript, 7, 38, 6, 6, 13, 32, 67, 67, 68, 45 PostScript, 72, 50, 50, 67, 52, 50, 52, 51, 52, 41, 44, 67, 6, 46, 22, 45, 60, 44, 46, 46, 46, 57, 62, 61, 25, 53, 68, 53, 53, 68, 56, 12, 21, 5, 35, 6, 13, 44, 65, 44, 68, 50, 51, 45, 34, 34, 24, 22, 5, 33, 9 77

78 78, 45, 13, 33, 20, 35, 18, 10, 20, 20, 20, 9, 70, 70, 5, 55, 36, 36, 45 Ghostscript, 6, 32, 25, 15, 33, 33, 33, 33, 31, 69, 13, 9, 43, 44, 44, 65, 65, 66, 65, 18, 6, 15, 60, 19, 24, 31, 6, 13, 16, 63, 14, 6, 13, 13, 52, 24, 24, 44, 65, 46, 12, 46, 17, 48, 48, 48, 13, 35, 53, 9, 18, 51, 51, 51, 44, 45, 68, 22, 23, 18, 19, 19, 18, 18, 18, 14, 23, 22, 23, 23, 23, 25, 22, 23, 35, 23, 14, 58, 30, 30, 30, 13, 5, 12, 13, 12, 17

79 , 8, 70, 46, 23, 57, 37, 9, 40, 47, 16, 13 Ghostscript, 6, 57, 48, 53, 14, 53, 68, 56, 33, 13, 21, 33, 48, 45, 60, 28, 6, 45, 10, 20, 53, 21, 46, 47, 49, 69, 33, 48, 20, 35, 21, 70, 23, 27, 28, 44, 65, 63, 9, 13, 25, 18, 44, 48, 68, 22, 48, 8, 22, 35, 14, 22, 24, 21, 16, 63 Ghostscript, 6, 48, 29, 14, 8, 16, 45, 66, 68, 62, 13, 48, 53, 53, 68, 56, 8, 20, 12, 12, 15 PostScript, 5, 48, 48, 13, 38, 17, 17, 37, 49, 45, 66, 68, 37, 15, 16, 14, 14, 24 79

80 80, 21, 23, 17, 24, 24, 5, 63, 46, 49, 69, 37, 8, 16, 16, 63, 26, 25, 25, 46, 47, 49, 69, 46, 59, 43, 43, 43, 43, 48, 40, 41 DSC, 70, 43, 9, 70, 40, 18, 20, 40, 26, 34, 63, 60, 63, 62, 37, 63, 37, 60, 68, 37, 60, 37, 60, 38, 60, 72, 60, 72, 60, 45, 68, 69, 68, 46, 45, 70, 44, 19, 55, 29, 56, 13, 53, 55, 68, 8, 16, 53, 55, 68, 9, 55, 23, 16, 20, 16, 12, 53, 12, 17, 18, 71, 48, 13, 38, 25, 38, 50, 17 DSC, 70, 17, 37, 5

81 , 5, 54 DSC, 70, 53, 54, 68, 6, 10, 12, 13, 51, 16, 70, 22, 70, 15, 63, 71, 13, 22, 37, 22, 16, 13, 63, 44, 50, 71, 45, 70, 5, 23, 70, 17, 14, 30, 61, 58, 17, 59, 22, 54, 63, 61, 45, 15, 46, 68, 17, 65, 17, 65, 17, 24, 36, 23, 16, 17, 15, 17, 16, 17, 15, 17, 15, 16, 63, 44, 59, 32, 45, 64, 45, 17, 16, 45, 68, 17, 9, 23, 68, 31, 9, 18, 18, 31, 23, 20, 37, 8, 16, 37, 20, 37, 38, 20, 32, 20, 20, 23, 54, 13 81

82 82, 41, 41, 25, 25, 25, 25, 53, 54, 71, 14, 14, 14, 43, 43, 10, 20, 46, 49, 69, 64, 59, 25, 26, 26, 26, 49, 67

2 PostScript PostScript (token) 437 == 437 == PostScript PostScript 437 == PostScript (operator) 437 == == ==

2 PostScript PostScript (token) 437 == 437 == PostScript PostScript 437 == PostScript (operator) 437 == == == PostScript version 1.03 2003 1 24 Copyright c 2000 2003 Daikoku Manabu 1 PostScript 1.1 PostScript PostScript PostScript (page description language) PostScript Adobe Systems Incorporated PostScript PostScript

More information

April, 2008 iii v 1 1 1.1.................................. 1 1.2 3.............................. 3 1.3 3.......................... 3 1.4................................... 4 1.5 HSV/HSB........................

More information

gs-cjk project gs: Ghostscript PostScript/PDF AFPL Ghostscript GNU Ghostscript c: Chinese j: Japanese k: Korean gs-cjk: A

gs-cjk project gs: Ghostscript PostScript/PDF AFPL Ghostscript GNU Ghostscript c: Chinese j: Japanese k: Korean gs-cjk:  A A Guide to gs-cjk Project taiji@aihara.co.jp A Guide to gs-cjk Project p.1/63 gs-cjk project gs: Ghostscript PostScript/PDF AFPL Ghostscript GNU Ghostscript c: Chinese j: Japanese k: Korean gs-cjk: http://www.gyve.org/gs-cjk/

More information

Copyright c 2008 Zhenjiang Hu, All Right Reserved.

Copyright c 2008 Zhenjiang Hu, All Right Reserved. 2008 10 27 Copyright c 2008 Zhenjiang Hu, All Right Reserved. (Bool) True False data Bool = False True Remark: not :: Bool Bool not False = True not True = False (Pattern matching) (Rewriting rules) not

More information

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV tutimura@mist.i.u-tokyo.ac.jp kaneko@ipl.t.u-tokyo.ac.jp http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/sem3/ 2002 11 20 p.1/34 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20

More information

Copyright c 2006 Zhenjiang Hu, All Right Reserved.

Copyright c 2006 Zhenjiang Hu, All Right Reserved. 1 2006 Copyright c 2006 Zhenjiang Hu, All Right Reserved. 2 ( ) 3 (T 1, T 2 ) T 1 T 2 (17.3, 3) :: (Float, Int) (3, 6) :: (Int, Int) (True, (+)) :: (Bool, Int Int Int) 4 (, ) (, ) :: a b (a, b) (,) x y

More information

Jlspec

Jlspec 1OFF 通常 OFF 通常 2 ON 設定内容の初期化を行う ( 工場出荷状態 ) OFF 通常 3 ON 自己診断 / 設定内容の印字を行う 4OFF 通常 %!PS-Adobe-2.0 /Courier findfont 10 scalefont setfont /LEFT 36 def /TOP 792 def /PITCH 12 def /LF {show /x LEFT def /y

More information

1 1.1 (JCPRG) 30 Nuclear Reaction Data File (NRDF) PC GSYS2.4 JCPRG GSYS2.4 Java Windows, Linux, Max OS X, FreeBSD GUI PNG, GIF, JPEG X Y GSYS2

1 1.1 (JCPRG) 30 Nuclear Reaction Data File (NRDF) PC GSYS2.4 JCPRG GSYS2.4 Java Windows, Linux, Max OS X, FreeBSD GUI PNG, GIF, JPEG X Y GSYS2 (GSYS2.4) GSYS2.4 Manual SUZUKI Ryusuke Hokkaido University Hospital Abstract GSYS2.4 is an update version of GSYS version 2. Main features added in this version are Magnifying glass function, Automatically

More information

TEX American Mathematical Society PostScript Adobe Systems Incorporated

TEX American Mathematical Society PostScript Adobe Systems Incorporated P A D manual ( pad2ps 3.1j ) (seiichi@muraoka.info.waseda.ac.jp) 1996 11 2 TEX American Mathematical Society PostScript Adobe Systems Incorporated pad2ps PAD PAD (Problem Analysis Diagram) C 1 2 PAD PAD

More information

LAN Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License

LAN Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License LAN 2014 3 19 Copyright c 1993 2014 Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License. 1 2 1.1................................... 2 1.2.........................

More information

2

2 Haskell ( ) kazu@iij.ad.jp 1 2 Blub Paul Graham http://practical-scheme.net/trans/beating-the-averages-j.html Blub Blub Blub Blub 3 Haskell Sebastian Sylvan http://www.haskell.org/haskellwiki/why_haskell_matters...

More information

ohp03.dvi

ohp03.dvi 19 3 ( ) 2019.4.20 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void int main(int argc, char *argv[]) {... 2 (2) argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0

More information

パズルをSugar制約ソルバーで解く

パズルをSugar制約ソルバーで解く Sugar 1 2 3 1 CSPSAT 2008 8 21 Sugar 1 2 3 Sugar Sugar (CSP) (SAT ) (encode) SAT SAT order encoding direct encoding support encoding http://bachistckobe-uacjp/sugar/ Web Sugar 1 2 3 Sugar SAT (COP) MAX-CSP

More information

グラフ数値読み取りシステム (GSYS2.4) 利用の手引

グラフ数値読み取りシステム (GSYS2.4) 利用の手引 (GSYS2.4) GSYS2.4 Manual SUZUKI Ryusuke Hokkaido University Hospital 2011 6 7 Abstract GSYS2.4 is an update version of GSYS version 2. Main features added in this version are Magnifying glass function,

More information

all.dvi

all.dvi fortran 1996 4 18 2007 6 11 2012 11 12 1 3 1.1..................................... 3 1.2.............................. 3 2 fortran I 5 2.1 write................................ 5 2.2.................................

More information

6 Tgif William Chia-Wei Chang tgif 3.0 pixmap URL Tgif 6.1: Tgif

6 Tgif William Chia-Wei Chang tgif 3.0 pixmap URL Tgif 6.1: Tgif 6 Tgif 121 6.1 Tgif............................ 122 6.2..................... 123 6.2.1...................... 126 6.2.2 Dash, Type, Style, Width.......... 127 6.2.3 Pen, Fill............. 128 6.2.4 Text......................

More information

r03.dvi

r03.dvi 19 ( ) 019.4.0 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void... argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0 a a \0 b b b \0 c c c \0 1: // argdemo1.c ---

More information

ohp1.dvi

ohp1.dvi 2008 1 2008.10.10 1 ( 2 ) ( ) ( ) 1 2 1.5 3 2 ( ) 50:50 Ruby ( ) Ruby http://www.ruby-lang.org/ja/ Windows Windows 3 Web Web http://lecture.ecc.u-tokyo.ac.jp/~kuno/is08/ / ( / ) / @@@ ( 3 ) @@@ :!! ( )

More information

listings-ext

listings-ext (6) Python (2) ( ) ohsaki@kwansei.ac.jp 5 Python (2) 1 5.1 (statement)........................... 1 5.2 (scope)......................... 11 5.3 (subroutine).................... 14 5 Python (2) Python 5.1

More information

main.dvi

main.dvi 20 II 7. 1 409, 3255 e-mail: namba@faculty.chiba-u.jp 2 1 1 1 4 2 203 2 1 1 1 5 503 1 3 1 2 2 Web http://www.icsd2.tj.chiba-u.jp/~namba/lecture/ 1 2 1 5 501 1,, \,", 2000 7. : 1 1 CPU CPU 1 Intel Pentium

More information

compiler-text.dvi

compiler-text.dvi 2018.4 1 2 2.1 1 1 1 1: 1. (source program) 2. (object code) 3. 1 2.2 C if while return C input() output() fun var ( ) main() C (C-Prime) C A B C 2.3 Pascal P 1 C LDC load constant LOD load STR store AOP

More information

main.dvi

main.dvi 1 F77 5 hmogi-2008f@kiban.civil.saitama-u.ac.jp 2013/5/13 1 2 f77... f77.exe f77.exe CDROM (CDROM D D: setupond E E: setupone 5 C:work\T66160\20130422>f77 menseki.f -o menseki f77(.exe) f77 f77(.exe) C:work\T66160\20130422>set

More information

(CC Attribution) Lisp 2.1 (Gauche )

(CC Attribution) Lisp 2.1 (Gauche ) http://www.flickr.com/photos/dust/3603580129/ (CC Attribution) Lisp 2.1 (Gauche ) 2 2000EY-Office 3 4 Lisp 5 New York The lisps Sammy Tunis flickr lisp http://www.flickr.com/photos/dust/3603580129/ (CC

More information

haskell.gby

haskell.gby Haskell 1 2 3 Haskell ( ) 4 Haskell Lisper 5 Haskell = Haskell 6 Haskell Haskell... 7 qsort [8,2,5,1] [1,2,5,8] "Hello, " ++ "world!" "Hello, world!" 1 + 2 div 8 2 (+) 1 2 8 div 2 3 4 map even [1,2,3,4]

More information

解きながら学ぶC++入門編

解きながら学ぶC++入門編 第 1 章 画面 出力 入力 2 問題 1-1 C++ List 1-1p.4 C++ // cout

More information

# let st1 = {name = "Taro Yamada"; id = };; val st1 : student = {name="taro Yamada"; id=123456} { 1 = 1 ;...; n = n } # let string_of_student {n

# let st1 = {name = Taro Yamada; id = };; val st1 : student = {name=taro Yamada; id=123456} { 1 = 1 ;...; n = n } # let string_of_student {n II 6 / : 2001 11 21 (OCaml ) 1 (field) name id type # type student = {name : string; id : int};; type student = { name : string; id : int; } student {} type = { 1 : 1 ;...; n : n } { 1 = 1 ;...; n = n

More information

ProVisionaire Control V3.0セットアップガイド

ProVisionaire Control V3.0セットアップガイド ProVisionaire Control V3 1 Manual Development Group 2018 Yamaha Corporation JA 2 3 4 5 NOTE 6 7 8 9 q w e r t r t y u y q w u e 10 3. NOTE 1. 2. 11 4. NOTE 5. Tips 12 2. 1. 13 3. 4. Tips 14 5. 1. 2. 3.

More information

1 # include < stdio.h> 2 # include < string.h> 3 4 int main (){ 5 char str [222]; 6 scanf ("%s", str ); 7 int n= strlen ( str ); 8 for ( int i=n -2; i

1 # include < stdio.h> 2 # include < string.h> 3 4 int main (){ 5 char str [222]; 6 scanf (%s, str ); 7 int n= strlen ( str ); 8 for ( int i=n -2; i ABC066 / ARC077 writer: nuip 2017 7 1 For International Readers: English editorial starts from page 8. A : ringring a + b b + c a + c a, b, c a + b + c 1 # include < stdio.h> 2 3 int main (){ 4 int a,

More information

org/ghc/ Windows Linux RPM 3.2 GHCi GHC gcc javac ghc GHCi(ghci) GHCi Prelude> GHCi :load file :l file :also file :a file :reload :r :type expr :t exp

org/ghc/ Windows Linux RPM 3.2 GHCi GHC gcc javac ghc GHCi(ghci) GHCi Prelude> GHCi :load file :l file :also file :a file :reload :r :type expr :t exp 3 Haskell Haskell Haskell 1. 2. 3. 4. 5. 1. 2. 3. 4. 5. 6. C Java 3.1 Haskell Haskell GHC (Glasgow Haskell Compiler 1 ) GHC Haskell GHC http://www.haskell. 1 Guarded Horn Clauses III - 1 org/ghc/ Windows

More information

3 3.1 algebraic datatype data k = 1 1,1... 1,n1 2 2,1... 2,n2... m m,1... m,nm 1 m m m,1,..., m,nm m 1, 2,..., k 1 data Foo x y = Alice x [y] B

3 3.1 algebraic datatype data k = 1 1,1... 1,n1 2 2,1... 2,n2... m m,1... m,nm 1 m m m,1,..., m,nm m 1, 2,..., k 1 data Foo x y = Alice x [y] B 3 3.1 algebraic datatype data 1 2... k = 1 1,1... 1,n1 2 2,1... 2,n2... m m,1... m,nm 1 m m m,1,..., m,nm m 1, 2,..., k 1 data Foo x y = Alice x [y] Bob String y Charlie Foo Double Integer Alice 3.14 [1,2],

More information

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B A/B (2018/10/19) Ver. 1.0 kurino@math.cst.nihon-u.ac.jp http://edu-gw2.math.cst.nihon-u.ac.jp/ kurino/2018/soft/soft.html 2018 10 19 A/B 1 2018 10 19 2 1 1 1.1 OHP.................................... 1

More information

: gettoken(1) module P = Printf exception End_of_system (* *) let _ISTREAM = ref stdin let ch = ref ( ) let read () = (let c =!ch in ch := inp

: gettoken(1) module P = Printf exception End_of_system (* *) let _ISTREAM = ref stdin let ch = ref ( ) let read () = (let c =!ch in ch := inp 7 OCaml () 1. 2. () (compiler) (interpreter) 2 OCaml (syntax) (BNF,backus normal form ) 1 + 2; let x be 2-1 in x; ::= ; let be in ; ::= + - ::= * / ::= 7.1 ( (printable characters) (tokens) 1 (lexical

More information

main.dvi

main.dvi A PostScript y 1997 1 Silicon Graphics i-station ( vhsgi) 1 i-station LaserMaster DisplayMaker-J DisplayMaker-J A dpi( ) PostScript 2 PostScript DisplayMaker-J i-station i-station ( AVS) PostScript i-station

More information

For_Beginners_CAPL.indd

For_Beginners_CAPL.indd CAPL Vector Japan Co., Ltd. 目次 1 CAPL 03 2 CAPL 03 3 CAPL 03 4 CAPL 04 4.1 CAPL 4.2 CAPL 4.3 07 5 CAPL 08 5.1 CANoe 5.2 CANalyzer 6 CAPL 10 7 CAPL 11 7.1 CAPL 7.2 CAPL 7.3 CAPL 7.4 CAPL 16 7.5 18 8 CAPL

More information

HARK Designer Documentation 0.5.0 HARK support team 2013 08 13 Contents 1 3 2 5 2.1.......................................... 5 2.2.............................................. 5 2.3 1: HARK Designer.................................

More information

GraphicsWithPlotFull.nb Plot[{( 1), ( ),...}, {( ), ( ), ( )}] Plot Plot Cos x Sin x, x, 5 Π, 5 Π, AxesLabel x, y x 1 Plot AxesLabel

GraphicsWithPlotFull.nb Plot[{( 1), ( ),...}, {( ), ( ), ( )}] Plot Plot Cos x Sin x, x, 5 Π, 5 Π, AxesLabel x, y x 1 Plot AxesLabel http://yktlab.cis.k.hosei.ac.jp/wiki/ 1(Plot) f x x x 1 1 x x ( )[( 1)_, ( )_, ( 3)_,...]=( ) Plot Plot f x, x, 5, 3 15 10 5 Plot[( ), {( ), ( ), ( )}] D g x x 3 x 3 Plot f x, g x, x, 10, 8 00 100 10 5

More information

コンパイラ

コンパイラ 1 ソフトウェアアークテクチャ 第 8 回ネットワークシステム 環境情報学部 萩野達也 スライド URL https://vu5.sfc.keio.ac.jp/sa/login.php 2 ソフトウェア 基本ソフトウェア オペレーティングシステム 単体で動作するソフトウェア シェル コンパイラ インタープリタ ネットワークを利用するソフトウェア WEB 電子メール チャット IP 電話 3 分散システム

More information

Boo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo if 11 for 11 range 12 break continue 13 pass

Boo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo if 11 for 11 range 12 break continue 13 pass Boo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo 6 6 7 9 10 11 if 11 for 11 range 12 break continue 13 pass 13 13 14 15 15 23 23 24 24 24 25 import 26 27-1- Boo Boo Python CLI.NET

More information

technews2012autumn

technews2012autumn For Higher Customer Satisfaction, We Bridge the SS System Between Customer s World. SUMMER 2013 GUI Install License Hot Fix 02 SUMMER 2013 2 User ID 1 SS terms umask 022 echo umask 022 >> ~/.bashrc SUMMER

More information

New version (2.15.1) of Specview is now available Dismiss Windows Specview.bat set spv= Specview set jhome= JAVA (C:\Program Files\Java\jre<version>\

New version (2.15.1) of Specview is now available Dismiss Windows Specview.bat set spv= Specview set jhome= JAVA (C:\Program Files\Java\jre<version>\ Specview VO 2012 2012/3/26 Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page http://www.stsci.edu/resources/software hardware/specview http://specview.stsci.edu/javahelp/main.html

More information

SCM (v0201) ( ) SCM 2 SCM 3 SCM SCM 2.1 SCM SCM SCM (1) MS-DOS (2) Microsoft(R) Windows 95 (C)Copyright Microsoft Corp

SCM (v0201) ( ) SCM 2 SCM 3 SCM SCM 2.1 SCM SCM SCM (1) MS-DOS (2) Microsoft(R) Windows 95 (C)Copyright Microsoft Corp SCM (v0201) ( ) 14 4 20 1 SCM 2 SCM 3 SCM 4 5 2 SCM 2.1 SCM SCM 2 1 2 SCM (1) MS-DOS (2) Microsoft(R) Windows 95 (C)Copyright Microsoft Corp 1981-1996. 1 (3) C:\WINDOWS>cd.. C:\>cd scm C:\SCM> C:\SCM>

More information

Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page htt

Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page   htt Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page http://www.stsci.edu/resources/software_hardware/specview http://specview.stsci.edu/javahelp/main.html Specview

More information

Microsoft PowerPoint - IntroAlgDs-05-5.ppt

Microsoft PowerPoint - IntroAlgDs-05-5.ppt アルゴリズムとデータ構造入門 25 年 月 日 アルゴリズムとデータ構造入門. 手続きによる抽象の構築.3 Formulating Astractions with Higher-Order Procedures ( 高階手続きによる抽象化 ) 奥乃 博. 3,5,7で割った時の余りが各々,2,3という数は何か? 月 日 本日のメニュー.2.6 Example: Testing for Primality.3.

More information

1,.,,,., RDBM, SQL. OSS,, SQL,,.

1,.,,,., RDBM, SQL. OSS,, SQL,,. 1,.,,,., RDBM, SQL. OSS,, SQL,,. 3 10 10 OSS RDBMS SQL 11 10.1 OSS RDBMS............................ 11 10.1.1 PostgreSQL................................. 11 10.1.2 MySQL...................................

More information

LiveCode初心者開発入門サンプル

LiveCode初心者開発入門サンプル / About LiveCode 01:... 11 02: Create... 15 set 03:... 21 name title LiveCode 04:... 29 global local width height 05:... 37 Controls Tools Palette Script Editor message handler 06:... 52 RGB 07:... 63

More information

gnuplot.dvi

gnuplot.dvi gnuplot gnuplot 1 gnuplot exit 2 10 10 2.1 2 plot x plot sin(x) plot [-20:20] sin(x) plot [-20:20][0.5:1] sin(x), x, cos(x) + - * / ** 5 ** plot 2**x y =2 x sin(x) cos(x) exp(x) e x abs(x) log(x) log10(x)

More information

新版 明解C++入門編

新版 明解C++入門編 第 1 章画面 出力 入力 C++ C++ C++ C++ C++ C++ C++ C++ #include using C++ C++ C++ main C++ C++ C++ int double char C++ C++ C++ string C++ C++ C++ 21 1-1 C++ 歴史 C++ C++ 歴史 CC with classes Fig.1-1 C C++ Simula 67

More information

VDM-SL VDM VDM-SL Toolbox VDM++ Toolbox 1 VDM-SL VDM++ Web bool

VDM-SL VDM VDM-SL Toolbox VDM++ Toolbox 1 VDM-SL VDM++ Web bool VDM-SL VDM++ 23 6 28 VDM-SL Toolbox VDM++ Toolbox 1 VDM-SL VDM++ Web 2 1 3 1.1............................................... 3 1.1.1 bool......................................... 3 1.1.2 real rat int

More information

コンピュータ概論

コンピュータ概論 4.1 For Check Point 1. For 2. 4.1.1 For (For) For = To Step (Next) 4.1.1 Next 4.1.1 4.1.2 1 i 10 For Next Cells(i,1) Cells(1, 1) Cells(2, 1) Cells(10, 1) 4.1.2 50 1. 2 1 10 3. 0 360 10 sin() 4.1.2 For

More information

Ruby Ruby ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( ) 44=>

Ruby Ruby ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( ) 44=> Ruby Ruby 200779 ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( 2+3+4+5+6+7+8+9 ) 44 irb(main):002:0> irb irb(main):001:0> 1+2+3+4 => 10 irb(main):002:0>

More information

test.gby

test.gby Beautiful Programming Language and Beautiful Testing 1 Haskeller Haskeller 2 Haskeller (Doctest QuickCheck ) github 3 Haskeller 4 Haskell Platform 2011.4.0.0 Glasgow Haskell Compiler + 23 19 8 5 10 5 Q)

More information

Fortran90/95 [9]! (1 ) " " 5 "Hello!"! 3. (line) Fortran Fortran 1 2 * (1 ) 132 ( ) * 2 ( Fortran ) Fortran ,6 (continuation line) 1

Fortran90/95 [9]! (1 )   5 Hello!! 3. (line) Fortran Fortran 1 2 * (1 ) 132 ( ) * 2 ( Fortran ) Fortran ,6 (continuation line) 1 Fortran90/95 2.1 Fortran 2-1 Hello! 1 program example2_01! end program 2! first test program ( ) 3 implicit none! 4 5 write(*,*) "Hello!"! write Hello! 6 7 stop! 8 end program example2_01 1 program 1!

More information

解きながら学ぶJava入門編

解きながら学ぶJava入門編 44 // class Negative { System.out.print(""); int n = stdin.nextint(); if (n < 0) System.out.println(""); -10 Ÿ 35 Ÿ 0 n if statement if ( ) if i f ( ) if n < 0 < true false true false boolean literalboolean

More information

cpall.dvi

cpall.dvi 55 7 gnuplot gnuplot Thomas Williams Colin Kelley Unix Windows MacOS gnuplot ( ) ( ) gnuplot gnuplot 7.1 gnuplot gnuplot () PC(Windows MacOS ) gnuplot http://www.gnuplot.info gnuplot 7.2 7.2.1 gnuplot

More information

1. A0 A B A0 A : A1,...,A5 B : B1,...,B

1. A0 A B A0 A : A1,...,A5 B : B1,...,B 1. A0 A B A0 A : A1,...,A5 B : B1,...,B12 2. 3. 4. 5. A0 A, B Z Z m, n Z m n m, n A m, n B m=n (1) A, B (2) A B = A B = Z/ π : Z Z/ (3) A B Z/ (4) Z/ A, B (5) f : Z Z f(n) = n f = g π g : Z/ Z A, B (6)

More information

r7.dvi

r7.dvi 11 5 Web 2011.6.21 1 1.1 1? 50 1 ( ) 92.2 cm 1: 1? 1 ( ) ( 1) 1 / ( ) 1.2 AD DA AD ( = ) (?) DA ( = ) AD/DA 16 165mm! 2: 165mm 164.5mm 165.5mm 0.1mm? 0.01mm? AD ( 2) 3 2 11010... 3: AD DA DA 3 ( ) 2 2.1

More information

Step 1 Feature Extraction Featuer Extraction Feature Extraction Featuer Extraction Image Analysis Start>Programs>Agilent-Life Sciences>Feature Extract

Step 1 Feature Extraction Featuer Extraction Feature Extraction Featuer Extraction Image Analysis Start>Programs>Agilent-Life Sciences>Feature Extract Agilent G2565AA Feature Extraction Step 1 Feature Extraction Step 2 Step 3 Step 4 ( ) Step 5 ( ) Step 6 Step 7 Step 8 Feature Extraction Step 9 Step 10 Feature Extraction Step 11 Feature Extraction Step

More information

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè11²ó

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè11²ó 11 2013 6 19 11 (6/19) 6 (18:10-19:40) λ13 UNIX : 2 / 26 UNIX UNIX sort, head, tail, cat, cut diff, tee, grep, uniq, wc join, find, sed, awk, screen 3 / 26 sort sort : $ sort [options] [FILE...] options

More information

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1 I117 II I117 PROGRAMMING PRACTICE II 2 MEMORY MANAGEMENT 2 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming

More information

解きながら学ぶC言語

解きながら学ぶC言語 printf 2-5 37 52 537 52 printf("%d\n", 5 + 37); 5370 source program source file.c ex00.c 0 comment %d d 0 decimal -2 -p.6 3-2 5 37 5 37-22 537 537-22 printf("537%d\n", 5-37); function function call ( )argument,

More information

電気通信大学 コンピュータリテラシー 文書整形 --- LaTeX ---

電気通信大学 コンピュータリテラシー 文書整形 --- LaTeX --- 1 L A TEX B5 1. LaTeX ( ) : 1 3 2. LaTeX ( ) : 4 7 3. LaTeX (,, EPS ) : 8 10 4. LaTeX ( ) : 11 textlatex.pdf : tiny.tex, tiny.pdf : 1 small.tex, small.pdf : 2 normal.tex, normal.pdf : f1.eps : normal.tex

More information

2 1 Web Java Android Java 1.2 6) Java Java 7) 6) Java Java (Swing, JavaFX) (JDBC) 7) OS 1.3 Java Java

2 1 Web Java Android Java 1.2 6) Java Java 7) 6) Java Java (Swing, JavaFX) (JDBC) 7) OS 1.3 Java Java 1 Java Java 1.1 Java 1) 2) 3) Java OS Java 1.3 4) Java Web Start Web / 5) Java C C++ Java JSP(Java Server Pages) 1) OS 2) 3) 4) Java Write Once, Run Anywhere 5) Java Web Java 2 1 Web Java Android Java

More information

alpha alpha03 Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License.

alpha alpha03 Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License. alpha03 alpha03 2018 9 16 alpha03 Copyright c 2017 2018 Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License. 3 1 4 1.1......................................

More information

Microsoft PowerPoint - IntroAlgDs-05-4.ppt

Microsoft PowerPoint - IntroAlgDs-05-4.ppt アルゴリズムとデータ構造入門 2005 年 0 月 25 日 アルゴリズムとデータ構造入門. 手続きによる抽象の構築.2 Procedures and the Processes They generate ( 手続きとそれが生成するプロセス ) 奥乃 博. TUT Scheme が公開されました. Windows は動きます. Linux, Cygwin も動きます. 0 月 25 日 本日のメニュー.2.

More information

# let rec sigma (f, n) = # if n = 0 then 0 else f n + sigma (f, n-1);; val sigma : (int -> int) * int -> int = <fun> sigma f n ( : * -> * ) sqsum cbsu

# let rec sigma (f, n) = # if n = 0 then 0 else f n + sigma (f, n-1);; val sigma : (int -> int) * int -> int = <fun> sigma f n ( : * -> * ) sqsum cbsu II 4 : 2001 11 7 keywords: 1 OCaml OCaml (first-class value) (higher-order function) 1.1 1 2 + 2 2 + + n 2 sqsum 1 3 + 2 3 + + n 3 cbsum # let rec sqsum n = # if n = 0 then 0 else n * n + sqsum (n - 1)

More information

0.2 Button TextBox: menu tab 2

0.2 Button TextBox: menu tab 2 Specview VO 2012 2012/9/27 Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page http://www.stsci.edu/resources/software hardware/specview http://specview.stsci.edu/javahelp/main.html

More information

Microsoft PowerPoint - ml1.ppt

Microsoft PowerPoint - ml1.ppt プログラミング演習 B ML 編 第 1 回 2010/6/1( コミ ) 2010/6/2( 情報 知能 ) 住井 http://www.kb.ecei.tohoku.ac.jp/ ~sumii/class/proenb2010/ml1/ 今日のポイント 1. ML って何? 2. 式を 評価 すると値になる 3. 式や値には 型 がある レポートについて 電気 情報系内のマシンから http://130.34.188.208/

More information

PBASIC 2.5 PBASIC 2.5 $PBASIC directive PIN type New DEBUG control characters DEBUGIN Line continuation for comma-delimited lists IF THEN ELSE * SELEC

PBASIC 2.5 PBASIC 2.5 $PBASIC directive PIN type New DEBUG control characters DEBUGIN Line continuation for comma-delimited lists IF THEN ELSE * SELEC PBASIC 2.5 PBASIC 2.5 BASIC Stamp Editor / Development System Version 2.0 Beta Release 2 2.0 PBASIC BASIC StampR PBASIC PBASIC PBASIC 2.5 Parallax, Inc. PBASIC 2.5 PBASIC 2.5 support@microbot-ed.com 1

More information

h23w1.dvi

h23w1.dvi 24 I 24 2 8 10:00 12:30 1),. Do not open this problem booklet until the start of the examination is announced. 2) 3.. Answer the following 3 problems. Use the designated answer sheet for each problem.

More information

WelcomeToPS_Finish

WelcomeToPS_Finish Welcome to Adobe's Printing Solution! 2 Windows 95 1999 6 18 Adobe Systems Incorporated http://www.adobe.co.jp/print http://www.adobe.com/print 3 Adobe PostScript PostScript1984 Adobe Systems Incorporated

More information

̤Äê

̤Äê SNS 1, IT.,.,.,., SNS,,,..,,.,,,.,.,,. 2 1 6 1.1................................................ 6 1.2................................................ 6 1.3...............................................

More information

6-1

6-1 6-1 (data type) 6-2 6-3 ML, Haskell, Scala Lisp, Prolog (setq x 123) (+ x 456) (setq x "abc") (+ x 456) ; 6-4 ( ) subtype INDEX is INTEGER range -10..10; type DAY is (MON, TUE, WED, THU, FRI, SAT, SUN);

More information

TM-m30 詳細取扱説明書

TM-m30 詳細取扱説明書 M00094100 Rev. A Seiko Epson Corporation 2015. All rights reserved. 2 3 4 5 6 Bluetooth 7 Bluetooth 8 1 9 Bluetooth 10 1 11 1 2 6 5 4 3 7 12 1 13 14 ONF 1 N O O N O N N N O F N N F N N N N N N F F O O

More information

第4回「文書清書システム」

第4回「文書清書システム」 1 ソフトウェアアークテクチャ 第 4 回文書清書システム 環境情報学部 萩野達也 スライド URL https://vu5.sfc.keio.ac.jp/slide/ 2 文書清書システム 文書清書システムとは 文書を清書して印刷するシステム 文書の右端をきれいに揃えてくれる 複数のフォントを利用してきれいに出してくれる 数式などをきれいに出してくれる 文書清書システムの分類 WYSIWYG 型

More information

2004 TV Indexing Index Auto-Making Soccer Video Digests :2005 2 2 3603U043-0 Katsunori Kawaguchi 1 7 1.1.................................... 7 1.2.................................. 7 1.3..................................

More information

mstrcpy char *mstrcpy(const char *src); mstrcpy malloc (main free ) stdio.h fgets char *fgets(char *s, int size, FILE *stream); s size ( )

mstrcpy char *mstrcpy(const char *src); mstrcpy malloc (main free ) stdio.h fgets char *fgets(char *s, int size, FILE *stream); s size ( ) 2008 3 10 1 mstrcpy char *mstrcpy(const char *src); mstrcpy malloc (main free ) stdio.h fgets char *fgets(char *s, int size, FILE *stream); s size ( ) stream FILE ( man ) 40 ( ) %./a.out String : test

More information

bdd.gby

bdd.gby Haskell Behavior Driven Development 2012.5.27 @kazu_yamamoto 1 Haskell 4 Mew Firemacs Mighty ghc-mod 2 Ruby/Java HackageDB 3 Haskeller 4 Haskeller 5 Q) Haskeller A) 6 7 Haskeller Haskell 8 9 10 Haskell

More information

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa I 2017 11 1 SageMath SageMath( Sage ) Sage Python Sage Python Sage Maxima Maxima Sage Sage Sage Linux, Mac, Windows *1 2 Sage Sage 4 1. ( sage CUI) 2. Sage ( sage.sage ) 3. Sage ( notebook() ) 4. Sage

More information

TM-m30 詳細取扱説明書

TM-m30 詳細取扱説明書 M00094106 Rev. G Seiko Epson Corporation 2015-2018. All rights reserved. 2 3 4 5 6 7 8 Bluetooth 9 ... 71 10 1 11 Bluetooth 12 1 13 1 2 6 5 4 3 7 14 1 1 2 3 4 5 15 16 ONF 1 N O O N O N N N O F N N F N

More information

GNUPLOT 28 3 15 UNIX Microsoft-Windows GNUPLOT 4 GNUPLOT 1 GNUPLOT 2 2 3 2.1 UNIX.......................................... 3 2.2 Windows........................................ 4 2.3..................................

More information

橡Pascal-Tの挙動を調べる

橡Pascal-Tの挙動を調べる PROGRAM SAMPLE01(INPUT, OUTPUT); BEGIN END. PROGRAM SAMPLE02(INPUT, OUTPUT); VAR X, Y, Z : INTEGER; BEGIN X := 1; Y := 2; Z := X + Y; WRITELN(Z); END. #!/usr/local/bin/perl #PASCAL-T OBJECT MAC FILE

More information

Technische Beschreibung P82R SMD

Technische Beschreibung P82R SMD P26 halstrup-walcher GmbH http://www.krone.co.jp/ Stegener Straße 10 D-79199 Kirchzarten, Germany 124-0023 2-22-1 TEL:03-3695-5431 FAX:03-3695-5698 E-MAIL:sales-tokyo@krone.co.jp 530-0054 2-2-9F TEL:06-6361-4831

More information

ストラドプロシージャの呼び出し方

ストラドプロシージャの呼び出し方 Release10.5 Oracle DataServer Informix MS SQL NXJ SQL JDBC Java JDBC NXJ : NXJ JDBC / NXJ EXEC SQL [USING CONNECTION ] CALL [.][.] ([])

More information

0527-PanMark

0527-PanMark Windows Pan-Mark Pan-Mark for Windows User s Guide Version 2.5 Copyright Panduit Corp. 1998, All Rights Reserved COPYRIGHT NOTICE Copyright 1998 Panduit Corp. All rights reserved. No part of this publication

More information

1153006 JavaScript try-catch JavaScript JavaScript try-catch try-catch try-catch try-catch try-catch 1 2 2 try-catch try-catch try-catch try-catch 25 1153006 26 2 12 1 1 1 2 3 2.1... 3 2.1.1... 4 2.1.2

More information

IDL_lecture_12Jan.ppt

IDL_lecture_12Jan.ppt NAOJ/ADC IDL (2012 Jan) IDL IDL ASIAA IDL RSI(->ITT) IDL IDL IDL IDL ADC IDL IDL ADC ADC Practical IDL programming By L. E. Gumley (MORGAN Kaufmann 8103 at Amazon IDLHELP (online ) Idlhelp on unix shell

More information

(Visual Secret Sharing Scheme) VSSS VSSS 3 i

(Visual Secret Sharing Scheme) VSSS VSSS 3 i 13 A Visual Secret Sharing Scheme for Continuous Color Images 10066 14 8 (Visual Secret Sharing Scheme) VSSS VSSS 3 i Abstract A Visual Secret Sharing Scheme for Continuous Color Images Tomoe Ogawa The

More information

コンピュータグラフィックス - 第4回 色彩の表現

コンピュータグラフィックス - 第4回 色彩の表現 .. 4 2013 10 9 ( ) 2013 10 9 1 / 22 3 3 3 ( ) 2013 10 9 2 / 22 380 nm 780 nm 1 nm = 10 9 m ( ) 2013 10 9 3 / 22 3 3 (S M L ) 3 3 3 ( ) 2013 10 9 4 / 22 加法混色 光の 3 原色を組み合わせることで 様々な色を表現できる 光を重ねて別の色を作ることを加法混色と呼ぶ

More information

untitled

untitled Fortran90 ( ) 17 12 29 1 Fortran90 Fortran90 FORTRAN77 Fortran90 1 Fortran90 module 1.1 Windows Windows UNIX Cygwin (http://www.cygwin.com) C\: Install Cygwin f77 emacs latex ps2eps dvips Fortran90 Intel

More information

Python Speed Learning

Python   Speed Learning Python Speed Learning 1 / 76 Python 2 1 $ python 1 >>> 1 + 2 2 3 2 / 76 print : 1 print : ( ) 3 / 76 print : 1 print 1 2 print hello 3 print 1+2 4 print 7/3 5 print abs(-5*4) 4 / 76 print : 1 print 1 2

More information

Autumn 2007 1 5 8 12 14 14 15 %!SASROOT/sassetup SAS Installation Setup Welcome to SAS Setup, the program used to install and maintain your SAS software. SAS Setup guides you through a series of menus

More information

R による統計解析入門

R による統計解析入門 R May 31, 2016 R R R R Studio GUI R Console R Studio PDF URL http://ruby.kyoto-wu.ac.jp/konami/text/r R R Console Windows, Mac GUI Unix R Studio GUI R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"

More information

syspro-0405.ppt

syspro-0405.ppt 3 4, 5 1 UNIX csh 2.1 bash X Window 2 grep l POSIX * more POSIX 3 UNIX. 4 first.sh #!bin/sh #first.sh #This file looks through all the files in the current #directory for the string yamada, and then prints

More information

BASICとVisual Basic

BASICとVisual Basic Visual Basic BASIC Visual Basic BASICBeginner's All purpose Symbolic Instruction Code Visual Basic Windows BASIC BASIC Visual Basic Visual Basic End Sub .Visual Basic Visual Basic VB 1-1.Visual Basic

More information

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble 25 II 25 2 6 13:30 16:00 (1),. Do not open this problem boolet until the start of the examination is announced. (2) 3.. Answer the following 3 problems. Use the designated answer sheet for each problem.

More information

Microsoft PowerPoint - IntroAlgDs-05-2.ppt

Microsoft PowerPoint - IntroAlgDs-05-2.ppt アルゴリズムとデータ構造入門 2005 年 10 月 11 日 アルゴリズムとデータ構造入門 1. 手続きによる抽象の構築 1.1 プログラムの要素 奥乃 博 1. TUT Schemeが公開されました. Windowsは動きます. Linux, Cygwin はうまく行かず. 調査中. 2. 随意課題 7の追加 友人の勉学を助け,TAの手伝いをする. 支援した内容を毎回のレポート等で詳細に報告.

More information

I

I I 6 4 10 1 1 1.1............... 1 1................ 1 1.3.................... 1.4............... 1.4.1.............. 1.4................. 1.4.3........... 3 1.4.4.. 3 1.5.......... 3 1.5.1..............

More information

num2.dvi

num2.dvi kanenko@mbk.nifty.com http://kanenko.a.la9.jp/ 16 32...... h 0 h = ε () 0 ( ) 0 1 IEEE754 (ieee754.c Kerosoft Ltd.!) 1 2 : OS! : WindowsXP ( ) : X Window xcalc.. (,.) C double 10,??? 3 :, ( ) : BASIC,

More information

untitled

untitled .NET Framework 6 2009 2 15 Copyright 2003-2006 All rights reserved. Reports.NET Reports.NET 275-0026 3-29-2-401 http://www.pao.ac/ 1....1 2....4 3....5 3-1. ...5 3-2. ...5 3-3.

More information