sdbin /03/30 Program name is xman Now analysing ScrollByL.i. Now analysing handler.i. struct (dot)member not defined 2 directory_height yyer

Size: px
Start display at page:

Download "sdbin /03/30 Program name is xman Now analysing ScrollByL.i. Now analysing handler.i. struct (dot)member not defined 2 directory_height yyer"

Transcription

1 Sapid Bug List sdbin /03/30 Error in sdbin X11R5/clients/twm/gram.c gram.i yacc # yacc yacc (gram.y gram.c) # <number> gram.y *.h (1995/11/28, ver ) sdbin /03/30 making all in./xditview... Now analysing draw.i. struct (dot)member not defined 1 strchr yyerror: draw.i:13243 sdb3: Error in /usr/local/sapid/bin/sdbin3 X11R5/clients/xditview/draw.i (line: 13243) index X11/Xos.h #define index strchr X11/Xos.h X11 index Sapid 1

2 sdbin /03/30 Program name is xman Now analysing ScrollByL.i. Now analysing handler.i. struct (dot)member not defined 2 directory_height yyerror: Error in sdbin X11R5/clients/xman static ScrollByL.c resource man.h resource 1995/10/12 static pidb /03/30 Error in cccp resource.c X11R5/clients/xrdb cpp sdb3? sdb3 -DCPP="\"/lib/cpp -DMips -DSYSV -DNOSTDHDRS -DX WCHAR -DX LOCALE -DXML\"" 2

3 sdbin /03/30 making all in./xdm... Now analysing dm.i. yyerror: dm.i:3970 parse error sdb3: Error in /usr/local/sapid/bin/sdbin3 X11R5/clients/xdm/dm.i (line: 3970) dm.c va list args; 1996/01/27 BUILTIN TYPE PARAMETER BUILTIN TYPE PARAMETER ( typename ) IRIX 5.3 cpp BUILTIN TYPE PARAMETER ( variable ) sdbin /04/03 SDB3/lex.l attribute, inline, const? gcc lex Linux gcc asm, extension, typeof " [a-za-z][a-za-z0-9 ]*" " [a-za-z][a-za-z0-9 ]*" Sapid SDB.conf Sapid const, const, inline, inline, inline, signed, volatile alignof builtin alignof asm attribute (1999/06/10, ver ) 3

4 sdbin /04/16 do-while void main(void) if (1) else do while(0); dummy(); do-while if else blk expr sdb,sdb3 (1995/10/05, ver. 1.93) sapid /07/09 AR3.h String X11/Intrinsic.h Sapid X Window System typedef char *String; typedef char *SpdString; AR /07/10 AR3 spdgetobjtext() Error: File Not Found fopen() fclose() fclose() 4

5 sdbin /07/12 OMT case cexpr 1995/10/ sdbin /07/12 ( ) declaration sort DECL STRUCT DECL UNION 1995/10/12 sdbin /03/01 optionaldecl prototype initializer identifier enum, type expr type, goto label, init expr, op type, prot type optionaldecl initializer, expr type, goto label, init expr, op type optionaldecl prototype identifier enum Sapid expr type SDB SDB mkexprtype prot type Sapid-2.4 5

6 sdbin /03/28 X11R5/clients/xterm NEC EXS-UX/V (Rel. 4.2) main.c screen.c sdb4 sdbin /03/28 enum sdbin /03/28 struct st; int x; int y; union int u; int v; data; st x, y, data u v 1995/10/12 6

7 sdbin /07/14 block BLOCK HIERACHICAL BLOCK COMPOUND BLOCK BRANCH block.h BLOCK DECL (BLOCK HIERACHICAL?) BLOCK COMP (BLOCK COMPOUND?) (1995/11/14, ver ) sdbin /05/26 void qsort(void *v[], int left, int right, int (*comp)(void *, void *)) ANSI void qsort(v, left, right, comp) void int *v[]; left, right; int (*comp)(void *, void *); (1995/11/14, ver ) 7

8 sdbin /09/28 else-part then-part SDB3/yacc.y else-part then-part (1995/10/05, ver. 1.93) sdbin /09/04 (, ) expression const ref void main() int x; x = 1, x = 111; (1995/11/14, ver ) sdbin /10/04 sprintf(s, "/home/togan/" "%s" "/.bowling", name,); (1995/11/14, ver ) 8

9 sdbin /10/02 int sub(int i) sub(i); (1995/11/14, ver ) sdbin /10/02 Sapid-0.90 stdarg.h typedef char *va_list; parse error BugList-sdbin /01/27 (1996/01/27, ver ) sdbin /10/05 const ref const ref void main(void) 1995/11/14 int x; x = 1 + f("foo"); (1995/11/14, ver ) 9

10 sdbin /10/04 redefintion sdbrgetobject() SpdCursor *csr ~tera/sapid/prj/sem.h 1995/10/06 sdbin /10/18 (expression) (operator) expr op 1995/11/28 (1995/11/28, ver ) 10

11 sdbin /10/25 ( ) Sapid Sapid short foo(void) int foo2(void) type foo FUNC -<type st>- DECL short foo2 FUNC -<type st>- DECL short int 1995/12/11 (1995/12/11, ver ) sdbin /10/19 sort sort sort EXPR SORT TRI sort EXPR SORT TRI EXPR SORT ARITH 1995/11/28 (1995/11/28, ver ) 11

12 sdbin /10/27 pointer object decl type pointer object struct int x; foo; struct int x; bar[]; decl type struct decl type [] ( ) decl type 1996/03/06 decl type (1996/03/06, ver ) sdbin /11/18 declaration declarator offset 1995/11/28 (1995/11/28, ver ) sdbin /12/07 sizeof(type) (type) expression operator expr op 1996/03/06 sizeof(type) (type) type (1996/03/06, ver ) 12

13 sdbin /12/08 2 TAG struct TAG int i; void f(void) struct TAG double d; (1998/12/09, ver ) sdbin /12/08 ( ) Sapid tag declarator struct t int a; int b; int func(struct t *bb) return (1); int c, d; declarator t int a; int b; t declarator declaration int c, d struct tag declarator 1995/12/11 (1995/12/11, ver ) 13

14 sdbin /12/14 blk decl parent block id void func() int a; a = 0; declaration int a; compound-block... a = 0; basic-block 1996/01/12 sdbin3 (1996/01/12, ver ) sdbin /11/28 sdbin3 ver compound block hierachical block label 14

15 sdbin /12/11 ( ) Sapid enum tag E e; declaration type e type ENUM SPECIFIER type is ident type tag 1996/03/06 (1996/03/06, ver ) sdbin /12/22 ( ), 3 struct tag int a,b; ; declarator text a b struct tag int a,b,c; a b c; struct tag int a,b,c,d; a b c,d d; ; 1996/01/12 sdbin3 (1996/01/12, ver ) 15

16 SDB /12/22 ( ) I-model expression lrtype lrvalue expression EXPR SORT CAMMA EXPR SORT COMMA EXPR SORT CAMMA EXPR SORT COMMA lrtype lrvalue lrtype Sapid <SAPID TOP>/AR3/AR3/class type.c <SAPID TOP>/SDA/dfgar.c 1996/01/23 (1996/01/23, ver ) sdbin /12/23 ( ) blk decl void func() int a; BugList-sdbin /01/12 sdbin3 (1996/01/12, ver ) 16

17 mkspec /02/05 test.c mkspec3(ver ) \globalvarfoosstruct foo [ 1 "tes] = test.h =============================== #define MAX_ELEM 10 struct foo int mem; ; extern struct foo foos[max_elem]; ======================================== = test.c =============================== #include "test.h" struct foo foos[max_elem]; int main() foos[0].mem = 0; ======================================== BUGGY MKSPEC

18 sdbin /02/08 ( ) Sapid sdbin3 STAR cast_expr: No type description pointer type main() int a; a = *"A string"; printf("a: %d %c.\n", a, a); 1996/03/06 (char *) ( ) (1996/03/06, ver ) 18

19 sdbin /02/08 ( ) Sapid sdbin3 parse error typedef struct tag int tag; tag; void main() tag *p; int i; i = p->tag; 1996/03/06 (typedef ) (1996/03/06, ver ) 19

20 sdbin /02/16 decl opt struct point int px; int py; ; int main() struct point p0 = 0, 80; initializer offset 1996/03/06 (1996/03/06, ver ) 20

21 SpdStr /02/18 expression INITLIST struct point int x; int y; ; void main() struct point p0 = 0, 80; main() struct point p0 = 080; (1996/03/21, ver ) SpdStr /02/12 spdstr segmentation fault struct int x; v; struct int x; *p; struct int x; a[]; <--- <--- segmentation fault <--- segmentation fault BugList-sdbin object decl type pointer object object decl type BugList-sdbin (1996/03/21, ver ) 21

22 SpdStr /02/12 else if void main() int i = 0; if (i < 0) i = 0; else i = 1; void main() int i = 0; if (i<0) i=1; else (1996/03/21, ver ) 22

23 SpdStr /02/12 BugList-sdbin spdstr case OP_SIZEOF_TYPE: res = spdstrcat(res, "sizeof("); type_id = spdgetarelobj(objectid, "op_type", "any"); res = spdstrcat(res, spdstrtypespecifier(type_id, 0)); res = spdstrcat(res, spdstrtypequantifier(type_id, NULL)); res = spdstrcat(res, ")"); break; case OP_CAST: res = spdstrcat(res, "("); res = spdstrcat(res, spdstrtypespecifier(type_id, 0)); res = spdstrcat(res, spdstrtypequantifier(type_id, NULL)); res = spdstrcat(res, ")"); break; sdbin3 case OP CAST: type_id = spdgetarelobj(objectid, "op_type", "any");? spdstr expr.c (1996/03/21, ver ) 23

24 sdbin /02/22 ( ) Sapid identifier tag e type struct a ident type struct a ; 1996/03/06 struct e int b; c; int d; ident type (1996/03/06, ver ) sdbin /02/22 ( ) Sapid tmp int *tmp = malloc(sizeof(*tmp)); reduce (1998/12/09, ver ) sdbin /02/21 ( ) Sapid type tag type is struct foo; C 1996/03/06 (1996/03/06, ver ) 24

25 sdbin /02/21 ( ) Sapid test.i file spdgetincludedocc() type struct a struct tag = test.i =============================== struct a ; struct int b; c; int d; ======================================== sdbin /03/02 I-model constant length (1996/05/25, ver ) sdbin /05/21 DECL TAG struct, union,enum declarator -<decl decl >- declaration -<decl type>- type type sort (1996/09/23) sdbin /05/21 wide L x wide L"xxx" 25

26 sdbin /06/23 offset 9 11 = test.i =============================== main() bbb"; char *cp = "aaa\ ======================================== sdbin /06/24 ( ) qualifier decl type qualifier int const int const int decl type func() int func(const int); 26

27 sdbin /06/25 ( ) Sapid struct foo int a; b; int foo(int, struct foo); void main() SpdStr struct foo int a; b; int foo(int, struct foo), foo; void main() 2 "struct xxx" declarator "xxx" decl decl 1 typedef Sapid sdbin /07/03 typedef typedef int (*F)(char a); declaration char a (1998/12/09, ver ) 27

28 sdbin /07/03 ident ref int (*func)(); func(); (func)() fixsdb ident ref sdbin /07/08 static int foo(a, b) char *a; int b;... declaration char *a; storage STORAGE STATIC (1996/07/16, ver ) SDA /07/29 ver SDA switch case break; CFG SDA /07/29 SDA CFG for 1-3, 1 28

29 pidb /08/13 pidb:?: Not OutputBuffer.\n #define Y 0 #define X Y #if (0 == 1) #else #if (X == 2) #endif #endif 1996/08/14 (1996/08/14, ver ) libpidb /08/14 HP-UX /usr/include/sys/syscall.h /* * getcontext() for HP-UX 10.0 was a DUX-ism. The system call number * 174 should not be used anymore. There is a new getcontext() for 10.0 * and beyond. This syscall has a number of 357. */ #define SYS_getcontext 174 #define SYS_GETCONTEXT 174 #define CPP directive 1996/08/21 lineconvertitoc() isdirectiveline() directive (1996/08/14, ver ) 29

30 sdbin /07/31 static void f1(x, y) unsigned long x; int y; void f3(x) register int x; spdstrtester static void f1(x, y) unsigned long void x; int y; register void f3(x) int x; unsigned long type ( ) class : type id : name : sort : DECLARATION (standard) qualifier : TYPE_UNKNOWN (not specified) type : TYPE_VOID (void) size : TYPE_LONG (long) sign : TYPE_UNSIGNED (unsigned) type TYPE VOID TYPE UNKNOWN f3 declaration ( ) x declaration ( ) f3 storage STORAGE REGISTER x storage STORAGE NONE (ver ) 30

31 sdbin /08/27 spdstrtester xterm/main.c union sigval int sival_int; void *sival_ptr; ; struct sigval int sival_int; void *sival_ptr; ; union struct type sort STRUCT TAG TYPE UNION TAG 1996/09/21 type sort TYPE UNION TAG struct union (1996/09/21, ver ) 31

32 SpdStr /08/27 int f() main() int (*func)() = f; (*func)(); spdstrtester int f() int main() int *func = f; (); (1996/08/30, ver ) 32

33 sdbin /08/30 extern int a; int x; int a = 1; spdstrtester extern int a; int x; int x = 1; x decl ident 2 % grep x SDB/identifier x 1 1 % grep SDB/decl_ident "int a = 1" "int a" (1997/02/25, ver ) sdbin /05/01 int foo(char); optionaldecl prototype char type prot type int foo(char c); char c BugList-sdbin (3) Sapid

34 sdbin /05/01 sizeof(int) operator sizeof(int) type op type BugList-sdbin (3) (1996/09/08, ver ) sdbin /10/15 identifier declarator declarator x = 3 identifier x extern declarator x identifier x extern int x; struct foo int x; ; int x = 3; Sapid

35 sdbin /10/28 enum sdb3 2 ident ref = enum.h =============================== enum a, b, c ; ======================================== = main.c =============================== #include "enum.h" void main() a; ======================================== = dummy.c ============================== #include "enum.h" void dummy() a; ======================================== sdb3 -o enum main.c dummy.c dummy.c a ident ref sdb4 sdb4 35

36 SAT /12/ /12/07 EUC EUC XSDA, SBR Tcl/Tk mkspec /01/22 mkspec3 local int main() int (*f)(); int (*x)[1]; : \localvarfint ()* \localvarxint [1]* SpdStr f 36

37 SpdStr /01/22 spdstrtester local : int main() int (*x)[1]; int main() int *x[1]; (1997/01/26, ver ) SDB int *x[]; int (*x)[]; sdbin /01/30 error(segv) int (func)(int x) return x; P.J.Plauger The Standard C Library program #define func(x) (x) 37

38 sdblink /03/30 2 typedef typedef sdbopt4 typedef identifier identifier ver === foo.h ========= typedef int FOO; FOO foo; =================== === a.c =========== #include "foo.h" =================== === b.c =========== #include "foo.h" =================== =================== typedef int ; ; =================== (1997/04/14, ver ) foo foo foo SpdStr 38

39 sdbin /04/07 void a(int (*f)(int)) (*f)(0); STAR cast_expr: No type description pointer type void a(int (*f)()) (*f)(0); a f f 4.4BSD-Lite Sapid Sapid

40 sdbin /04/11 NULL POINTER READ typedef struct _fn void (*fn)(void); FN ; void test(void) puts("test():"); void main(void) FN fp; fp.fn = test; fp.fn(); (1997/05/23, ver. 2.8) 40

41 mkpidb /04/12 sdb3 Error: Not find macid 26.? sdb3: Error in /usr/local/sapid/bin/mkpidb4 #define A 0 #define B 100 #if 0 #define A 50 #endif #define B 1 void foo() B; (1997/04/24, ver ) 41

42 sdbin /04/28 union foo_u int a; b; struct foo_s int a; c; sdb4 spdstrtester union int a; b; struct foo_s int a; c; union SDB3/write db.c SDB4/write db.c (1997/04/28, ver ) 42

43 sdbin /04/28 void foo(const char); const char c; void foo(const char a) const char b; const void foo(const char); char c; void foo(char a) char b; (1997/04/30, ver ) sdbin[34] SpdStr SpdStr type qualifier (const volatile) qualifier 43

44 sdbin /04/29 int foo(void) char a; int b; int foo() void a; int b; (1997/05/02, ver ) sdbin /05/08 sdbin[34] typedef int bar; int foo() char bar; bar = a ; typedef bar = a ; syntax error (1999/06/28, ver ) 44

45 sdbin /01/22 spdstrtester main f int main(int argc, char *argv[]) int (*f)(int, int); : int main(int argc, char *argv[],, int ) int (*f)(); SDB? SDB main optionaldecl declaration optionaldecl <func_parm> "int argc" <func_parm> "char *argv" <func_parm> <--- <func_parm> <decl_type> "int" 2 declaration f I-model declaration int (*f)(int, int) 2 int BugList-sdbin int (*F)(char a) char a BugList-sdbin Sapid

46 sdbin /06/05 typedef int X; int f(const X a); type const X identifier X type is type const struct Y identifier Y type is int f(const struct Y); type is typedef int X; void f() const X a; (1998/05/13, ver ) sdbin /06/10 void f(char *a,...) f declaration... optionaldecl (char *a,...) func parm (1997/06/13, ver. 2.41) 46

47 sdbin /06/13 identifier p redefinition 3 void main() sdbin /06/14 int p; void f(int p); extern int f(int, char * const [], const char *); extern int g(int, const char * [], const char *); (1998/12/09, ver ) 47

48 sdbin /06/20 2 AR3 Free Memory Read = file1.c ========= extern p[1][1]; =================== = file2.c ========= /* (file1.c ) */ extern p[1][1]; =================== 2 (1 ) sdb4 file2.c file1.c sdb4 file1.c file2.c sdbin /08/21 Syntax error enum X; void main(void) enum X; (1999/06/28, ver ) 48

49 sdbin /10/21 struct a int m; ; void f(int, struct a); SpdStr struct a int m; ; void f(int, struct a), a ; 2 struct, union, enum declaration void f(int, struct a); decl decl declarator f(int, struct a) declarator a (1997/10/25, ver ) sdbin /10/24 struct a ; int m; double f, g(char, struct a); SpdStr struct a int m; ; double f, g(double, struct a); (1997/10/26, ver ) 49

50 mkspec /10/30 mkspec4 f() g();, f(). (1997/11/03, ver ) sdbin /11/03 int f(struct _tag); declaration "struct tag" declarator " tag" decl decl (1998/10/30, ver. 3.68) 50

51 mkspec /12/04 Sapid int b(int); int a(int); int a(int c) int b(int c) mkspec4 Error: Can t get prototype of "b". callee caller (1997/12/09, ver ) mkspec /12/04 Sapid int main() func(); int func() mkspec4 caller callee (1997/12/29, ver ) 51

52 mkspec /11/18 Sapid struct huft int a; ; int huft_free(struct huft *t) mkspec4 huft sat4 decl decr ident struct huft *t + huft (DECL TAG) huft (ID TAG) + *t (DECL VARIABLE) t (ID VARIABLE) DECL TAG decr ID VARIABLE ident decl ident DECL TAG decr arg type.c (1997/12/02, ver ) sdblink /12/17 static var offset. #include <stdio.h> static int static_var = 0; void main(void) static (1997/12/19, ver ) 52

53 sdbin /12/16 extern void (*signal(int, void (*)()))(); sdb4 spdstrtester extern void (*(signal))(); I-model sip /12/26 Sapid int main() int a[10]; func(a); int func(int b[10]) b[0] = 1; sip func(a) a[] func() (1) int func(int b[]) (2) int func(int b[xxx]) (2) a[] b[] (1) SIP 53

54 SpdStr /12/29 SpdStr #define A(a,b) B(b,a) + B(b,a) #define B(a,b) C(b,a) - C(b,a) #define C(a,b) a*b A(a,b) a A(a,b) B(b,a) + B(b,a) 5 14 a*b - a*b + a*b - a*b 5 14 AR /01/07 AR sdblink spdgetoffsetofobj() spdgetincludedocc() sdblink file1.i ---<file_decl>-+- declaration identifier1 file2.i ---<file_decl>-+ AR file decl identifier1 file1.i file2.i 54

55 mkpidb /01/11 mkpidb4 #define A B #define B(x) (x) int i = A(1); ( ) #define A(x) B(x) #define B(x) (x) int i = A(1); sdblink /02/25 sdblink4 struct _fp fp; void (*f)(void); void h() int main(void) fp.f = h; fp.f(); return (0); fp.f(); 55

56 sdbin /02/27 declaration funcdef decl type offset typedef int Integer; Integer global; Integer func1(void) return(1); void main(void) func1(); *.c offset declaration normal ( Integer global; ) Integer declaration funcdef ( Integer func1(void)... ) Integer *.i offset spdconvregionitoc() declaration funcdef (1998/04/01, ver ) sdblink /02/27 const ref constant 30 offset -1 char str1[30]; void main() str1; SDB/const ref offset -6 SDB/ISDB/*.i.ISDB (1998/04/01, ver ) 56

57 sdblink /03/24 typedef const type is p t int typedef int p_t; extern f(const p_t); typedef int p_t; const p_t a; PIDB /03/28 cppcharconvitoc() = test1.h ========= #define RETSIGTYPE void RETSIGTYPE abort_gzip(void); =================== = file1.c ========= #include "test1.h" =================== declaration void abort gzip(void); id occ.offset cppcharconvitoc() *.c -1 57

58 sdbin /04/13 a.c = a.c ======================== char a(int); void main() void (*b)(int); b = (void (*)(int))a; b(1); ============================== ============================== char a(int); void main() void (*b)(int); b = (void*)a; b(1); ============================== I-model void (*)(int) int SpdStr a.c [operator] "(void (*)(int))" <op_type> [type] <type_st> [type] <type_st> [type] "void" type st void (*)()

59 sdbin /04/13 FreeBSD /usr/include/machine/types.h typedef long long int64_t; I-model long long type TYPE LONG LONG (1998/04/20, ver ) sdbin /04/16 int *(p[1]) p identifier declarator sort prototype optionaldecl (1999/06/28, ver ) 59

60 sdbin /07/19 f() optionaldecl () int f(void) int (*g)(); f() body ( optionaldecl) offset ( opt decl ) x() () ( optionaldecl) offset ( opt decl ) int f(void) int x(); (1998/10/27, ver. 3.64) PIDB /07/19 x #define F(x) x (x) 60

61 SpdStr /09/18 f() #define X c-mode int f() #define X f() X f() #define X #define X int f() (1998/09/20, ver ) 61

62 sdblink4a /12/14 Sapid = getopt.h =================== struct option int x; ; extern int f(const struct option); ============================== = getopt.c =================== #include "getopt.h" ============================== = gzip.c ===================== #include "getopt.h" struct option a; ============================== % sdb4 getopt.c gzip.c getopt.c include f() declaration gzip.c include f() declaration sdblink4a legacy type-spec routine % sdb4 -sdbi -t getopt.c gzip.c ISDB type is sdblink4 sdbin /02/26 s int s =... (void int) struct r int x;; int s = (struct r *)0; (1999/06/28, ver ) 62

63 sdbin /05/12 2 enum a ; f() int x, a; enum a ; f() int a; enum a ; f() int a, x; (1999/06/04, ver ) PIDB /08/26 PIDB DEFINEinfo 1 PIDB stream.c DEFINEinfo #define hoge\ mkpmodel /08/26 ( PIDB has 1 argument info but can t find ) in source. ) #define foo(/* a comment */ x) bar((x)) 63

64 sdbin /10/06 2 Int offset 2 declaration decl type offset const offset typedef int Int; const Int i; sdbin /10/06 sizeof offset 2 Int offset typedef int Int; int i = sizeof(int); 64

untitled

untitled II yacc 005 : 1, 1 1 1 %{ int lineno=0; 3 int wordno=0; 4 int charno=0; 5 6 %} 7 8 %% 9 [ \t]+ { charno+=strlen(yytext); } 10 "\n" { lineno++; charno++; } 11 [^ \t\n]+ { wordno++; charno+=strlen(yytext);}

More information

untitled

untitled II 4 Yacc Lex 2005 : 0 1 Yacc 20 Lex 1 20 traverse 1 %% 2 [0-9]+ { yylval.val = atoi((char*)yytext); return NUM; 3 "+" { return + ; 4 "*" { return * ; 5 "-" { return - ; 6 "/" { return / ; 7 [ \t] { /*

More information

新版明解C言語 実践編

新版明解C言語 実践編 2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,

More information

‚æ4›ñ

‚æ4›ñ ( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28 ( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9

More information

program.dvi

program.dvi 2001.06.19 1 programming semi ver.1.0 2001.06.19 1 GA SA 2 A 2.1 valuename = value value name = valuename # ; Fig. 1 #-----GA parameter popsize = 200 mutation rate = 0.01 crossover rate = 1.0 generation

More information

yacc.dvi

yacc.dvi 2017 c 8 Yacc Mini-C C/C++, yacc, Mini-C, run,, Mini-C 81 Yacc Yacc, 1, 2 ( ), while ::= "while" "(" ")" while yacc 1: st while : lex KW WHILE lex LPAREN expression lex RPAREN statement 2: 3: $$ = new

More information

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C 1 6 9 1 main main 1 NULL NULL 1 15 23 25 48 26 30 32 36 38 43 45 47 50 52 for 2 (a) 2 2 1 Yacc 2 (b) 2 3 yytext tmp2 ("") tmp2->next->word tmp2 yytext tmp2->next->word

More information

新・明解C言語 実践編

新・明解C言語 実践編 第 1 章 見 21 1-1 見えないエラー 見 List 1-1 "max2x1.h" a, b max2 List 1-1 chap01/max2x1.h max2 "max2x1.h" #define max2(a, b) ((a) > (b)? (a) : (b)) max2 List 1-2 List 1-2 chap01/max2x1test.c max2 #include

More information

double float

double float 2015 3 13 1 2 2 3 2.1.......................... 3 2.2............................. 3 3 4 3.1............................... 4 3.2 double float......................... 5 3.3 main.......................

More information

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

解きながら学ぶC++入門編 !... 38!=... 35 "... 112 " "... 311 " "... 4, 264 #... 371 #define... 126, 371 #endif... 369 #if... 369 #ifndef... 369 #include... 3, 311 #undef... 371 %... 17, 18 %=... 85 &... 222 &... 203 &&... 40 &=...

More information

Condition DAQ condition condition 2 3 XML key value

Condition DAQ condition condition 2 3 XML key value Condition DAQ condition 2009 6 10 2009 7 2 2009 7 3 2010 8 3 1 2 2 condition 2 3 XML key value 3 4 4 4.1............................. 5 4.2...................... 5 5 6 6 Makefile 7 7 9 7.1 Condition.h.............................

More information

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D 6 2019 5 14 6.1 Minimum C....................... 6 1 6.2....................................... 6 7 6.1 Minimum C Minimum C BNF T okenseq W hite Any Digit ::= 0 1 2... 9. Number ::= Digit Digit. Alphabet

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

Microsoft PowerPoint - CproNt02.ppt [互換モード]

Microsoft PowerPoint - CproNt02.ppt [互換モード] 第 2 章 C プログラムの書き方 CPro:02-01 概要 C プログラムの構成要素は関数 ( プログラム = 関数の集まり ) 関数は, ヘッダと本体からなる 使用する関数は, プログラムの先頭 ( 厳密には, 使用場所より前 ) で型宣言 ( プロトタイプ宣言 ) する 関数は仮引数を用いることができる ( なくてもよい ) 関数には戻り値がある ( なくてもよい void 型 ) コメント

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) double

More information

lexex.dvi

lexex.dvi (2018, c ) http://istksckwanseiacjp/ ishiura/cpl/ 4 41 1 mini-c lexc,, 2 testlexc, lexc mini-c 1 ( ) mini-c ( ) (int, char, if, else, while, return 6 ) ( ) (+, -, *, /, %, &, =, ==,!=, >, >=,

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double

More information

ex12.dvi

ex12.dvi 1 0. C, char., char, 0,. C, ("),., char str[]="abc" ; str abc.,, str 4. str 3. char str[10]="abc" ;, str 10, str 3., char s[]="abc", t[10] ;, t = s. ASCII, 0x00 0x7F, char., "abc" 3, 1. 1 8 256, 2., 2

More information

新・明解C言語 ポインタ完全攻略

新・明解C言語 ポインタ完全攻略 2 1-1 1-1 /* 1-1 */ 1 int n = 100; int *p = &n; printf(" n %d\n", n); /* n int */ printf("*&n %d\n", *&n); /* *&n int */ printf(" p %p\n", p); /* p int * */ printf("&*p %p\n", &*p); /* &*p int * */ printf("sizeof(n)

More information

PowerPoint Presentation

PowerPoint Presentation p.130 p.198 p.208 2 double weight[num]; double min, max; min = max = weight[0]; for( i= 1; i i < NUM; i++ ) ) if if ( weight[i] > max ) max = weight[i]: if if ( weight[i] < min ) min = weight[i]: weight

More information

ARM gcc Kunihiko IMAI 2009 1 11 ARM gcc 1 2 2 2 3 3 4 3 4.1................................. 3 4.2............................................ 4 4.3........................................

More information

1:. Csmith,, (B!=0? A/B : A),.,., Orange3 [3], Orange4 [4],., Csmith., Csmith GCC LLVM.,,., Orange3, Orange4,, if for., Orange4, C, Csmith.,., if, for

1:. Csmith,, (B!=0? A/B : A),.,., Orange3 [3], Orange4 [4],., Csmith., Csmith GCC LLVM.,,., Orange3, Orange4,, if for., Orange4, C, Csmith.,., if, for C 1 1 1, C,.,,, if, for,.,, while, switch,,,. Orange4,, GCC-8.0.0 LLVM/Clang-6.0 ( 2017 12 ).,,,, Enriching Generation of Control Statements and Data Structures for Random Test of C Compilers Based on

More information

橡Pro PDF

橡Pro PDF 1 void main( ) char c; /* int c; */ int sum=0; while ((c = getchar())!= EOF) if(isdigit(c) ) sum += (c-'0'); printf("%d\n", sum); main()int i,sum=0; for(i=0;i

More information

卒 業 研 究 報 告.PDF

卒 業 研 究 報 告.PDF C 13 2 9 1 1-1. 1-2. 2 2-1. 2-2. 2-3. 2-4. 3 3-1. 3-2. 3-3. 3-4. 3-5. 3-5-1. 3-5-2. 3-6. 3-6-1. 3-6-2. 4 5 6 7-1 - 1 1 1-1. 1-2. ++ Lisp Pascal Java Purl HTML Windows - 2-2 2 2-1. 1972 D.M. (Dennis M Ritchie)

More information

C

C C 1 2 1.1........................... 2 1.2........................ 2 1.3 make................................................ 3 1.4....................................... 5 1.4.1 strip................................................

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

CX-Checker CX-Checker (1)XPath (2)DOM (3) 3 XPath CX-Checker. MISRA-C 62%(79/127) SQMlint 76%(13/17) XPath CX-Checker 3. CX-Checker 4., MISRA-C CX- Ch

CX-Checker CX-Checker (1)XPath (2)DOM (3) 3 XPath CX-Checker. MISRA-C 62%(79/127) SQMlint 76%(13/17) XPath CX-Checker 3. CX-Checker 4., MISRA-C CX- Ch CX-Checker: C 1 1 2 3 4 5 1 CX-Checker CX-Checker XPath DOM 3 CX-Checker MISRA-C CX-Checker: A Customizable Coding Checker for C TOSHINORI OSUKA, 1 TAKASHI KOBAYASHI, 1 JUNICHI MASE, 2 NORITOSHI ATSUMI,

More information

(ver. 1.3 (2018) ) yacc 1 1 yacc yacc (Yet Another Compiler Compiler) UNIX yacc yacc y *.y yacc ) yacc *.tab.h *.tab.c C C yacc yacc UNIX yacc bison 2

(ver. 1.3 (2018) ) yacc 1 1 yacc yacc (Yet Another Compiler Compiler) UNIX yacc yacc y *.y yacc ) yacc *.tab.h *.tab.c C C yacc yacc UNIX yacc bison 2 (ver. 1.3 (2018) ) yacc 1 1 yacc yacc (Yet Another Compiler Compiler) UNIX yacc yacc y *.y yacc ) yacc *.tab.h *.tab.c C C yacc yacc UNIX yacc bison 2 yacc yacc lex %token yacc yacc token *.tab.h #define

More information

Microsoft Word - Sample_CQS-Report_English_backslant.doc

Microsoft Word - Sample_CQS-Report_English_backslant.doc ***** Corporation ANSI C compiler test system System test report 2005/11/16 Japan Novel Corporation *****V43/NQP-DS-501-1 Contents Contents......2 1. Evaluated compiler......3 1.1. smp-compiler compiler...3

More information

ohp08.dvi

ohp08.dvi 19 8 ( ) 2019.4.20 1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: 2 (2) NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( 2) 3 (3) head cur tail head cur prev data

More information

1.ppt

1.ppt /* * Program name: hello.c */ #include int main() { printf( hello, world\n ); return 0; /* * Program name: Hello.java */ import java.io.*; class Hello { public static void main(string[] arg)

More information

新コンフィギュレータのフレームワークについて

新コンフィギュレータのフレームワークについて : 2007 12 7 6: 2009 5 9 TOPPERS 1.... 4 1.1... 4 1.2 TOPPERS... 4 2.... 4 2.1... 4 3.... 8 4.... 9 4.1... 9 4.2... 10 4.3... 10 4.3.1... 11 4.3.2 INCLUDE... 11 4.3.3 C... 12 4.4 API... 14 4.2.1 API...

More information

gcc C C tcc lex yacc flex bison [ ] Tiny C 2 Lex [ 2.6 ] 2.1 lex yacc [ ] lex flex yacc bison yacc yyparse() C yyparse() yylex() yylex() yylex() flex

gcc C C tcc lex yacc flex bison [ ] Tiny C 2 Lex [ 2.6 ] 2.1 lex yacc [ ] lex flex yacc bison yacc yyparse() C yyparse() yylex() yylex() yylex() flex 3 1 C Tiny C Tiny C int if while Tiny C 4 C Tiny C % cat test.tc int f(int x) while(x > 1) x = x - 2; return x; Tiny C NASM [3] tcc C % tcc < test.tc GLOBAL f f push ebp mov ebp, esp L1 mov eax, [ebp+8]

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

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 1. 1.1. 1.2. 1 PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 2. 2.1. 2 1 2 C a b N: PC BC c 3C ac b 3 4 a F7 b Y c 6 5 a ctrl+f5) 4 2.2. main 2.3. main 2.4. 3 4 5 6 7 printf printf

More information

Java演習(4) -- 変数と型 --

Java演習(4)   -- 変数と型 -- 50 20 20 5 (20, 20) O 50 100 150 200 250 300 350 x (reserved 50 100 y 50 20 20 5 (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics; (reserved public class Blocks1 extends

More information

3.1 stdio.h iostream List.2 using namespace std C printf ( ) %d %f %s %d C++ cout cout List.2 Hello World! cout << float a = 1.2f; int b = 3; cout <<

3.1 stdio.h iostream List.2 using namespace std C printf ( ) %d %f %s %d C++ cout cout List.2 Hello World! cout << float a = 1.2f; int b = 3; cout << C++ C C++ 1 C++ C++ C C++ C C++? C C++ C *.c *.cpp C cpp VC C++ 2 C++ C++ C++ [1], C++,,1999 [2],,,2001 [3], ( )( ),,2001 [4] B.W. /D.M.,, C,,1989 C Web [5], http://kumei.ne.jp/c_lang/ 3 Hello World Hello

More information

r07.dvi

r07.dvi 19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1

More information

ohp07.dvi

ohp07.dvi 19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5

More information

r08.dvi

r08.dvi 19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev

More information

tuat1.dvi

tuat1.dvi ( 1 ) http://ist.ksc.kwansei.ac.jp/ tutimura/ 2012 6 23 ( 1 ) 1 / 58 C ( 1 ) 2 / 58 2008 9 2002 2005 T E X ptetex3, ptexlive pt E X UTF-8 xdvi-jp 3 ( 1 ) 3 / 58 ( 1 ) 4 / 58 C,... ( 1 ) 5 / 58 6/23( )

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

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

slide5.pptx

slide5.pptx ソフトウェア工学入門 第 5 回コマンド作成 1 head コマンド作成 1 早速ですが 次のプログラムを head.c という名前で作成してください #include #include static void do_head(file *f, long nlines); int main(int argc, char *argv[]) { if (argc!=

More information

2008 IIA (program) pro(before)+gram(write) (artificial language) (programming languege) (programming) (machine language) (assembly language) ( )

2008 IIA (program) pro(before)+gram(write) (artificial language) (programming languege) (programming) (machine language) (assembly language) ( ) 2008 IIA 1 1.1 (program) pro(before)+gram(write) (artificial language) (programming languege) (programming) (machine language) (assembly language) () (high-level language) 3 (machine language) (CPU) 0

More information

K227 Java 2

K227 Java 2 1 K227 Java 2 3 4 5 6 Java 7 class Sample1 { public static void main (String args[]) { System.out.println( Java! ); } } 8 > javac Sample1.java 9 10 > java Sample1 Java 11 12 13 http://java.sun.com/j2se/1.5.0/ja/download.html

More information

C言語復習

C言語復習 著者 : 大和正武 生成日時 : 20151102-17:59 Copyright 2013 Red Hat, K.K. Copyright 2015 Red Hat, K.K. C 言語復習 The text of and illustrations in this document are licensed by Red Hat under a Creative

More information

RX600 & RX200シリーズ アプリケーションノート RX用仮想EEPROM

RX600 & RX200シリーズ アプリケーションノート RX用仮想EEPROM R01AN0724JU0170 Rev.1.70 MCU EEPROM RX MCU 1 RX MCU EEPROM VEE VEE API MCU MCU API RX621 RX62N RX62T RX62G RX630 RX631 RX63N RX63T RX210 R01AN0724JU0170 Rev.1.70 Page 1 of 33 1.... 3 1.1... 3 1.2... 3

More information

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D II 8 2003 11 12 1 6 ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 Daisuke 8 =>. 73 Daisuke 35 Hiroshi 64 Ichiro 87 Junko

More information

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf("hello World\n"); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf(hello World\n); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o 18 C ( ) 1 1 1.1 hello world.c 5 printf("hello World\n"); 6 } [ ] [ ] #include % cc hello_world.c %./a.out Hello World [a.out ] % cc hello_world.c -o hello_world [ ( ) ] (K&R 4.1.1) #include

More information

新・明解Java入門

新・明解Java入門 537,... 224,... 224,... 32, 35,... 188, 216, 312 -... 38 -... 38 --... 102 --... 103 -=... 111 -classpath... 379 '... 106, 474!... 57, 97!=... 56 "... 14, 476 %... 38 %=... 111 &... 240, 247 &&... 66,

More information

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l C/C++ 2007 6 18 1 C STL(1) 2 1.1............................................... 2 1.2 stdio................................................ 3 1.3.......................................... 10 2 11 2.1 sizeof......................................

More information

untitled

untitled H8/300,H8S,H8SX [H8S,H8/300 Tool Chain Ver6.2.0.0] #define Inline static inline //************************************************** Inline char sil_and_mem(char *mem,char and) return (*((volatile

More information

1.1 1 C IIA $ cd comp3a %endminipage ~/comp3a mkdir $ mkdir comp3a $ cd comp3a C.c Emacs Cntrol x Control s 2 Emacs Control-x Control-f Control-

1.1 1 C IIA $ cd comp3a %endminipage ~/comp3a mkdir $ mkdir comp3a $ cd comp3a C.c Emacs Cntrol x Control s 2 Emacs Control-x Control-f Control- 1 C IIA 1 C IIA IIA 1.1 Mac OS X 1.1.1 Mac OS X Unicode(UTF-8) UTF-8 Jedit X( ) Emacs( ) Emacs Emacs Emacs [Finder] [] Emacs dock Jedit X C 1. Jedit X Dock drag & drop Jedit X [Finder] [] Jedit X Folder

More information

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç C (3) if else switch AND && OR (NOT)! 1 BMI BMI BMI = 10 4 [kg]) ( [cm]) 2 bmi1.c Input your height[cm]: 173.2 Enter Input your weight[kg]: 60.3 Enter Your BMI is 20.1. 10 4 = 10000.0 1 BMI BMI BMI = 10

More information

fp.gby

fp.gby 1 1 2 2 3 2 4 5 6 7 8 9 10 11 Haskell 12 13 Haskell 14 15 ( ) 16 ) 30 17 static 18 (IORef) 19 20 OK NG 21 Haskell (+) :: Num a => a -> a -> a sort :: Ord a => [a] -> [a] delete :: Eq a => a -> [a] -> [a]

More information

C言語によるアルゴリズムとデータ構造

C言語によるアルゴリズムとデータ構造 Algorithms and Data Structures in C 4 algorithm List - /* */ #include List - int main(void) { int a, b, c; int max; /* */ Ÿ 3Ÿ 2Ÿ 3 printf(""); printf(""); printf(""); scanf("%d", &a); scanf("%d",

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

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

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

untitled

untitled C -1 - -2 - concept lecture keywords FILE, fopen, fclose, fscanf, fprintf, EOF, r w a, typedef gifts.dat Yt JZK-3 Jizake tsumeawase 45 BSP-15 Body soap set 3 BT-2 Bath towel set 25 TEA-2 Koutya

More information

数値計算

数値計算 プログラム作成から実行まで 数値計算 垣谷公徳 17 号館 3 階電子メール : kimi@ee.ous.ac.jp Source program hello.c printf("hello\n"); コンパイラ Library libc.a 0011_printf000101001 1101_getc00011100011 1011_scanf1110010100 コンパイル Object module

More information

file"a" file"b" fp = fopen("a", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen("b", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose

filea fileb fp = fopen(a, r); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen(b, r); while(fgets(line, BUFSIZ, fp)) {... fclose I117 9 2 School of Information Science, Japan Advanced Institute of Science and Technology file"a" file"b" fp = fopen("a", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen("b", "r"); while(fgets(line,

More information

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value = Part2-1-3 Java (*) (*).class Java public static final 1 class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó  ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡ (2018) 2018 5 17 0 0 if switch if if ( ) if ( 0) if ( ) if ( 0) if ( ) (0) if ( 0) if ( ) (0) ( ) ; if else if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 (0) 2 if else

More information

I 2 tutimura/ I 2 p.1/??

I 2   tutimura/ I 2 p.1/?? I 2 tutimura@mist.i.u-tokyo.ac.jp http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/ 2002 4 25 I 2 p.1/?? / / Makefile I 2 p.2/?? Makefile make GNU make I 2 p.3/?? Makefile L A T E X I 2 p.4/?? core (1) gcc,

More information

joho07-1.ppt

joho07-1.ppt 0xbffffc5c 0xbffffc60 xxxxxxxx xxxxxxxx 00001010 00000000 00000000 00000000 01100011 00000000 00000000 00000000 xxxxxxxx x y 2 func1 func2 double func1(double y) { y = y + 5.0; return y; } double func2(double*

More information

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) 3 5 14 18 21 23 23 24 28 29 29 31 32 34 35 35 36 38 40 44 44 45 46 49 49 50 pref : 2004/6/5 (11:8) 50 51 52 54 55 56 57 58 59 60 61

More information

第5回お試しアカウント付き並列プログラミング講習会

第5回お試しアカウント付き並列プログラミング講習会 qstat -l ID (qstat -f) qscript ID BATCH REQUEST: 253443.batch1 Name: test.sh Owner: uid=32637, gid=30123 Priority: 63 State: 1(RUNNING) Created at: Tue Jun 30 05:36:24 2009 Started at: Tue Jun 30 05:36:27

More information

XMPによる並列化実装2

XMPによる並列化実装2 2 3 C Fortran Exercise 1 Exercise 2 Serial init.c init.f90 XMP xmp_init.c xmp_init.f90 Serial laplace.c laplace.f90 XMP xmp_laplace.c xmp_laplace.f90 #include int a[10]; program init integer

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

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v 1 http://www7.bpe.es.osaka-u.ac.jp/~kota/classes/jse.html kota@fbs.osaka-u.ac.jp /* do-while */ #include #include int main(void) double val1, val2, arith_mean, geo_mean; printf( \n );

More information

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value = Part2-1-3 Java (*) (*).class Java public static final 1 class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value

More information

1: JX-model XML File Package Import Class Intf Ctor Method SInit Field Param Local ExtdOpt ImplOpt ThrwOpt Members QName Type Stmt Label Expr ident li

1: JX-model XML File Package Import Class Intf Ctor Method SInit Field Param Local ExtdOpt ImplOpt ThrwOpt Members QName Type Stmt Label Expr ident li Sapid JX-model ver. 1.3.13 2003 2 27 1 JX-model Java XML JX-model JX-model Java (Java 2 ver. 1.4) 20 7 JX-model 1 ^ $ Child nodes JX-model / ( ) JX-model @ @id @sort 1.1 File File JX-model XML /Package,

More information

RHEA key

RHEA key 2 P (k, )= k e k! 3 4 Probability 0.4 0.35 0.3 0.25 Poisson ( λ = 1) Poisson (λ = 3) Poisson ( λ = 10) Poisson (λ = 20) Poisson ( λ = 30) Gaussian (µ = 1, s = 1) Gaussian ( µ = 3, s = 3) Gaussian (µ =

More information

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() malloc 2 #include <stdio.h> #include

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() malloc 2 #include <stdio.h> #include 1 1.1 C 2 1 double a[ ][ ]; 1 3x3 0 1 3x3 ( ) 0.240 0.143 0.339 0.191 0.341 0.477 0.412 0.003 0.921 1.2 malloc() malloc 2 #include #include #include enum LENGTH = 10 ; int

More information

O(N) ( ) log 2 N

O(N) ( ) log 2 N 2005 11 21 1 1.1 2 O(N) () log 2 N 1.2 2 1 List 3-1 List 3-3 List 3-4? 3 3.1 3.1.1 List 2-1(p.70) 1 1 10 1 3.1.2 List 3-1(p.70-71) 1 1 2 1 2 2 1: 1 3 3.1.3 1 List 3-1(p.70-71) 2 #include stdlib.h

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

8 / 0 1 i++ i 1 i-- i C !!! C 2

8 / 0 1 i++ i 1 i-- i C !!! C 2 C 2006 5 2 printf() 1 [1] 5 8 C 5 ( ) 6 (auto) (static) 7 (=) 1 8 / 0 1 i++ i 1 i-- i 1 2 2.1 C 4 5 3 13!!! C 2 2.2 C ( ) 4 1 HTML はじめ mkdir work 作業用ディレクトリーの作成 emacs hoge.c& エディターによりソースプログラム作成 gcc -o fuga

More information

1.

1. 3 ( ) 1. n Tiny C n yacc (bison) lex (flex) n IA n n n n n n (lex ) 50 (yacc ) 400 200 550 n n yacc/lex TA Tiny C n C n int n (if, while) int fact(int n) {! if (n == 1) return 1;! else return n * fact(n-1);!

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

tuat2.dvi

tuat2.dvi ( 2 ) http://ist.ksc.kwansei.ac.jp/ tutimura/ 2012 7 7 ( 2 ) 1 / 54 (1) (2) (?) (1) (2) 2 ( 2 ) 2 / 54 1. 30 2. 2012 6 30 25 OS ( 2 ) 3 / 54 10 20 1993 1996 2000 2003 = 30 ( 2 ) 4 / 54 1 2 2 ( 2 ) 5 /

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

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 12 11 p.1/33 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20

More information

J.JSSAC Vol. 7, No. 2, Mathematica Maple,., Open asir Open xxx asir. Open xxx Open asir, asir., Open xxx, Linux Open asir Open sm1 (kan/sm1). C

J.JSSAC Vol. 7, No. 2, Mathematica Maple,., Open asir Open xxx asir. Open xxx Open asir, asir., Open xxx, Linux Open asir Open sm1 (kan/sm1). C J.JSSAC (1999) Vol. 7, No. 2, pp. 2-17 Open asir HPC (Received 1997/12/1) 1 Open asir Open xxx,., ( ),,,,,.,., (1) (2) (3) (4),. Open xxx,.,., 1.,.,., 0 10, dx,.,., ohara@math.kobe-u.ac.jp taka@math.kobe-u.ac.jp

More information

memo

memo 数理情報工学演習第一 C プログラミング演習 ( 第 5 回 ) 2015/05/11 DEPARTMENT OF MATHEMATICAL INFORMATICS 1 今日の内容 : プロトタイプ宣言 ヘッダーファイル, プログラムの分割 課題 : 疎行列 2 プロトタイプ宣言 3 C 言語では, 関数や変数は使用する前 ( ソースの上のほう ) に定義されている必要がある. double sub(int

More information

1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return 0; 戻り値 1: main() 2.2 C main

1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf(hello World!!\n); return 0; 戻り値 1: main() 2.2 C main C 2007 5 29 C 1 11 2 2.1 main() 1 FORTRAN C main() main main() main() 1 return 1 1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return

More information

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou 1 1.1 C 2 1 double a[ ][ ]; 1 3x3 0 1 3x3 ( ) 0.240 0.143 0.339 0.191 0.341 0.477 0.412 0.003 0.921 1.2 malloc() 2 double *a[ ]; double 1 malloc() double 1 malloc() free() 3 #include #include

More information

Java updated

Java updated Java 2003.07.14 updated 3 1 Java 5 1.1 Java................................. 5 1.2 Java..................................... 5 1.3 Java................................ 6 1.3.1 Java.......................

More information

LIFO(last in first out, ) 1 FIFO(first in first out, ) 2 2 PUSH POP : 1

LIFO(last in first out, ) 1 FIFO(first in first out, ) 2 2 PUSH POP : 1 2007 7 17 2 1 1.1 LIFO(last in first out, ) 1 FIFO(first in first out, ) 2 2 PUSH POP 2 2 5 5 5 1: 1 2 データの追加 データの取り出し 5 2 5 2 5 2: 1.2 [1] pp.199 217 2 (binary tree) 2 2.1 (three: ) ( ) 秋田高専 校長 準学士課程学生

More information

char int float double の変数型はそれぞれ 文字あるいは小さな整数 整数 実数 より精度の高い ( 数値のより大きい より小さい ) 実数 を扱う時に用いる 備考 : 基本型の説明に示した 浮動小数点 とは数値を指数表現で表す方法である 例えば は指数表現で 3 書く

char int float double の変数型はそれぞれ 文字あるいは小さな整数 整数 実数 より精度の高い ( 数値のより大きい より小さい ) 実数 を扱う時に用いる 備考 : 基本型の説明に示した 浮動小数点 とは数値を指数表現で表す方法である 例えば は指数表現で 3 書く 変数 入出力 演算子ここまでに C 言語プログラミングの様子を知ってもらうため printf 文 変数 scanf 文 if 文を使った簡単なプログラムを紹介した 今回は変数の詳細について習い それに併せて使い方が増える入出力処理の方法を習う また 演算子についての復習と供に新しい演算子を紹介する 変数の宣言プログラムでデータを取り扱う場合には対象となるデータを保存する必要がでてくる このデータを保存する場所のことを

More information

1-4 int a; std::cin >> a; std::cout << "a = " << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >>

1-4 int a; std::cin >> a; std::cout << a =  << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >> 1 C++ 1.1 C C++ C++ C C C++ 1.1.1 C printf() scanf() C++ C hello world printf() 1-1 #include printf( "hello world\n" ); C++ 1-2 std::cout

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

joho09.ppt

joho09.ppt s M B e E s: (+ or -) M: B: (=2) e: E: ax 2 + bx + c = 0 y = ax 2 + bx + c x a, b y +/- [a, b] a, b y (a+b) / 2 1-2 1-3 x 1 A a, b y 1. 2. a, b 3. for Loop (b-a)/ 4. y=a*x*x + b*x + c 5. y==0.0 y (y2)

More information

Jacques Garrigue

Jacques Garrigue Jacques Garrigue Garrigue 1 Garrigue 2 $ print_lines () > for i in $1; do > echo $i > done $ print_lines "a b c" a b c Garrigue 3 Emacs Lisp (defun print-lines (lines) (dolist (str lines) (insert str)

More information

SystemC 2.0を用いた簡易CPUバスモデルの設計

SystemC 2.0を用いた簡易CPUバスモデルの設計 SystemC 2.0 CPU CPU CTD&SW CT-PF 2002/1/23 1 CPU BCA UTF GenericCPU IO (sc_main) 2002/1/23 2 CPU CPU CQ 1997 11 Page 207 4 Perl Verilog-HDL CPU / Verilog-HDL SystemC 2.0 (asm) ROM (test.hex) 2002/1/23

More information

±é½¬£²¡§£Í£Ð£É½éÊâ

±é½¬£²¡§£Í£Ð£É½éÊâ 2012 8 7 1 / 52 MPI Hello World I ( ) Hello World II ( ) I ( ) II ( ) ( sendrecv) π ( ) MPI fortran C wget http://www.na.scitec.kobe-u.ac.jp/ yaguchi/riken2012/enshu2.zip unzip enshu2.zip 2 / 52 FORTRAN

More information

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( "data.t

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( data.t C++ 1 C C++ C++ C C C++ 1.1 C printf() scanf() C++ C 1-1 #include int a; scanf( "%d", &a ); printf( "a = %d\n", a ); C++ 1-2 int a; std::cin >> a; std::cout

More information

Java学習教材

Java学習教材 Java 2016/4/17 Java 1 Java1 : 280 : (2010/1/29) ISBN-10: 4798120987 ISBN-13: 978-4798120980 2010/1/29 1 Java 1 Java Java Java class FirstExample { public static void main(string[] args) { System.out.println("

More information

Microsoft Word - Training10_プリプロセッサ.docx

Microsoft Word - Training10_プリプロセッサ.docx Training 10 プリプロセッサ 株式会社イーシーエス出版事業推進委員会 1 Lesson1 マクロ置換 Point マクロ置換を理解しよう!! マクロ置換の機能により 文字列の置き換えをすることが出来ます プログラムの可読性と保守性 ( メンテナンス性 ) を高めることができるため よく用いられます マクロ置換で値を定義しておけば マクロの値を変更するだけで 同じマクロを使用したすべての箇所が変更ができるので便利です

More information