Tmax FDL Reference Manual : TMFR : Tmax 3.8 : Sep 20, 2003 : Sep 20, 2003

Size: px
Start display at page:

Download "Tmax FDL Reference Manual : TMFR : Tmax 3.8 : Sep 20, 2003 : Sep 20, 2003"

Transcription

1 Tmax FDL Reference Manual : TMFR : Tmax 3.8 : Sep 20, 2003 : Sep 20, 2003

2 Tmax FDL Reference Manual Tmax 3.8 1

3 2

4 Copyright (c) 2001 Tmax Soft Co., Ltd. All Rights Reserved.,,, Tmax soft.,,,..... Tmax, WebT, WebtoB, JEUS, Host-Link, WebInOne Tmax Soft Co., Ltd.. Tmax Tel: , 2006 Fax: Document Edition Date Version TMFR FEB 19, 2003 Tmax 3.8 Tmax. Tmax Standard. Tmax Standard TP Function + 2 Phase Commit Web Admin Console, X.25 Gateway, TCP/IP Gateway, Host-Link, Power Tmax Options Builder Interface Module, SERIAL Gateway, TCP/IP Service Gateway 3

5 ? Tmax FDL(Field Definition Language) 3-tier architecture system. ( ) FDL buffer type API. SUN 32bit, SUN 64bit, Compaq, HP 32bit, HP64bit, Linux, Windows NT 3.0/4.0 and Windows Tmax System UNIX, UNIX UNIX. UNIX,.?. 1 : FDL 2 : FDL API 1 FDL, 2 FDL ( ) API prototype,,,,. Tmax Programming Guide ( C ) Tmax Administration Guide Tmax Reference Manual { [ ] ( ) Numeric String Literal abc abc 4

6 1. FDL FDL FDL FDL FDL API fballoc.. 12 fbbufop 14 fbbufop_proj fbcalcsize fbchg_tu fbchg_tut fbdelall. 25 fbdelall_tu fbdelete fbextread fbfldcount fbfprint. 35 fbfree fbftos fbget fbgetalloc_tu fbgetalloc_tut fbget_fbsize 46 fbget_fldkey 47 fbget_fldname fbget_fldno.. 49 fbget_fldtype

7 fbgetlast_tu. 52 fbget_strfldtype.. 54 fbget_tu fbget_tut fbget_unused fbget_used.. 60 fbgetf fbgetlen fbgetnth fbgetntht fbgetval fbgetvali fbgetval_last_tu.. 73 fbgetvall_tu. 75 fbgetvals fbgetvals_tu 79 fbgetvalt fbinit fbinsert 85 fbisfbuf 87 fbispres fbkeyoccur.. 89 fbmake_fldkey fbnext_tu fbprint.. 93 fbput fbputt fbrealloc fbread 101 fbsnull fbstelinit

8 fbstinit fbstof. 109 fbstrerror fbtypecvt fbupdate fbwrite getfberrno. 119 getfberror

9 1. FDL 1.1 FDL..,. Tmax FDL. FDL(Field Definition Language) C. FDL. FDL (,, ). FDL FDL FDL. : FDL (fieldkey). :. : C(ANSI C) short, integer, long, float, double, char. Tmax string carray. :. 8

10 1.2 FDL. C struct. C C id,,,,. struct student { long stid; char name[10]; char addr[40]; short age; char sex; ; stid long, name addr [carray], age short sex character. x student. x->stid, x->name, x->addr, x->age, x->sex, ,.... 9

11 1.3 FDL Tmax fdlc.. Tmax. demo.f # name number type flags comments *base 100 INPUT 101 string - - OUTPUT 102 string - - SEQNO 201 string - - CORPNO 202 string - - COMPDATE 203 string - - TOTMON 204 long - - GUARAT 205 float - - GUAMON 206 float - T_BITMAP 900 carray - - FILENAME 901 string - - NEWFILE 902 string - - *base 1000 data1 301 long - - data2 302 long - - data3 303 long - - sumdata 304 long - - data4 305 long - - name, number, type. name 48 fbget_fldkey(). number type. number type, type number. demo.f *base base number base INPUT number 201. base base. type. char, short, int, long, float, double, string, carray 8. fdlc. fdlc [-a -c -u -d] {-i [-o ] [-h ] [-f ] [-ji -jc] [-p ] -a : (default tmax.fdl) i 10

12 . -c :. (default tmax.fdl). -u : (default tmax.fdl) i. -d : (default tmax.fdl) i. -i :.. -o : (.fdl). tmax.fdl. -h :. fdl _fdl.h. -f : -a,-u,-d. tmax.fdl. -ji : webt Tmax fdlc java interface. -jc : webt Tmax fdlc java class. -p : class interface. fdlc -c -i demo.f demo.f fdlc demo_fdl.h tmax.fdl. o. fdlc -c -i demo.f -o filename.fdl ( ). FDLFILE filename.fdl. ( filename.fdl, fdlc. default tmax.fdl, -o.) FDLFILE=/home/tmax/sample/fdl/filename.fdl. fdlc Tmax Reference Manual. 11

13 2. FDL API fballoc fballoc : FBUF *fballoc(int count, FLDLEN datalen) fbcalcsize(),tpalloc() tpinit() argument. argument 1024 byte default 1024 byte.. fbfree(). count datalen.(allocation memory size count*sizeof(int) + datalen +.), NULL fberror setting. fballoc(), fberrno. FBEMALLOC :..... FBUF *fbuf; if ((fbuf = fballoc(100, 1000)) == NULL) { printf( fballoc failed, errno = %d\n, fberror);... /* result allocated size : 1408 bytes */ tpalloc(). tpalloc() argument 0 default 12

14 1024 byte. argument 1024 byte default 1024 byte. FBUF *fbuf; if ((fbuf = (FBUF *)tpalloc( FIELD, NULL, 0)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); /* result allocated size : 1024 bytes */ fbisfbuf(), fbcalcsize(), tpalloc(), fbinit() 13

15 fbbufop fbbufop :,,, int fbbufop(fbuf *dest, FBUF *src, int mode),, input argument mode. fbbufop() argument dest src. * Process Modes FBMOVE FBCOPY FBCOMP FBCONCAT FBJOIN : src dest. dest argument string carray. string carray dest argument (FBUF *) type casting. : src dest. dest, src argument. : dest, src matching 1 0 matching 1 return. 0 dest, src value,,, 1,, value. : src dest. dest src. : matching src dest. dest. matching.. matching src dest FBOJOIN FBUPDATE matching src dest. FBOJOIN : FBJOIN FBUPDATE : FBOJOIN dest src fballoc() tpalloc() Mode process mode. 14

16 1, 1 fberror setting. fbbufop(), fberrno. FBENOSPACE : fberror FBENOSPACE setting. FBEMALLOC :. fberror FBEMALLOC setting. FBEINVAL : input argument argument. #include "demo_fdl.h" main() { FBUF *destbuf, *srcbuf; destbuf=fballoc(5,5); fbput(destbuf, INPUT, "5555", 0); fbput(destbuf, INPUT, "7777", 0); fbput(destbuf, OUTPUT, "3333", 0); fbput(destbuf, SEQNO, "8888", 0); srcbuf=fballoc(5,5); fbput(srcbuf, INPUT, "1111", 0); fbput(srcbuf, OUTPUT, "2222", 0); fbput(srcbuf, CORPNO, "3333", 0); /* Mode select. */ printf("input : "); scanf("%d", &a); switch(a) { /*FBMOVE mode */ case 1: iret=fbbufop(destbuf, srcbuf, FBMOVE); 15

17 fbprint(destbuf); break; /* destbuf : 1111, 2222, 3333 */ /*FBCOMP mode */ case 2: iret=fbbufop(destbuf, srcbuf, FBCOMP); printf("ret = %d\n", iret); if(iret < 0) { printf("do not match!!!\n"); fbfree(destbuf); fbfree(srcbuf); exit(0); printf("match!!!\n"); break; /* Do not match!!! */ /*FBCOPY mode */ case 3: iret=fbbufop(destbuf, srcbuf, FBCOPY); fbprint(destbuf); break; /* destbuf : 1111, 2222, 3333 */ /*FBCONCAT mode */ case 4: iret=fbbufop(destbuf, srcbuf, FBCONCAT); fbprint(destbuf); break; /* destbuf : 5555, 7777, 3333, 8888, 1111, 2222, 3333 */ /*FBJOIN mode */ case 5: iret=fbbufop(destbuf, srcbuf, FBJOIN); fbprint(destbuf); break; /* destbuf : 1111, 2222 */ /*FBOJOIN mode */ case 6: iret=fbbufop(destbuf, srcbuf, FBOJOIN); fbprint(destbuf); 16

18 break; /* destbuf : 1111, 7777, 2222, 8888 */ /*FBUPDATE mode */ case 7: iret=fbbufop(destbuf, srcbuf, FBUPDATE); fbprint(destbuf); break; /* destbuf : 1111, 7777, 2222, 8888, 3333 */ fbfree(destbuf); fbfree(srcbuf); fbbufop_proj() 17

19 fbbufop_proj fbbufop_proj : dest int fbbufop_proj(fbuf *dest, FBUF *src, FLDKEY *fldkey) src dest. argument fieldkey src dest fieldkey. fbbufop_proj() argument dest src. argument NULL setting dest. dest src fballoc() tpalloc(). fieldkey. 0. 1, 1 fberror setting. fbbufop_proj(), fberrno. FBEMALLOC :. fberror FBEMALLOC setting. #include demo_fdl.h... int iret, i; FBUF *destbuf, *srcbuf; FLDKEY fkey[4];... fbput(destbuf, INPUT, "aaa", 0); fbput(destbuf, OUTPUT, "bbb", 0); fbput(destbuf, SEQNO, "ccc", 0); fbput(srcbuf, TEST1, "AAA", 0); 18

20 fbput(srcbuf, TEST2, "BBB", 0); fbput(srcbuf, TEST3, "CCC", 0); fkey[0]=fbget_fldkey("input"); fkey[1]=fbget_fldkey("seqno"); fkey[2]=0; /* The last entry in the array must be 0 */ ret=fbbufop_proj(destbuf, NULL, fkey); /* destbuf : aaa, ccc */ fkey[0]=fbget_fldkey("test3"); fkey[1]=fbget_fldkey("test1"); fkey[2]=fbget_fldkey("test2"); fkey[3]=0; /* The last entry in the array must be 0 */ ret=fbbufop_proj(destbuf, srcbuf, fkey); /* destbuf : AAA, BBB, CCC */ /* fkey array is sorted if the entries are not in numeric order */ fbbufop() 19

21 fbcalcsize fbcalcsize : long fbcalcsize(int count, FLDLEN datalen) fballoc() tpalloc(). (byte ) argument. count datalen. input argument(count, datalen) byte. #include demo_fdl.h FBUF *fbuf; long size; size = fbcalcsize(100, 1000); printf( size : [%ld]\n, size); /* output : size : [1408] */ if ((fbuf = (FBUF *)tpalloc( FIELD, NULL, size)) == NULL) { printf( tpalloc failed, errno = %d\n, tperrno);. /* fbuf is set in 1024 bytes by default if size is less than 1024*/... fballoc(), tpalloc() 20

22 fbchg_tu fbchg_tu : int fbchg_tu(fbuf *fbuf, FLDKEY fldkey, int nth, char *value, FLDLEN fldlen) fballoc() tpalloc() input argument. Input argument (nth) (nth).,. fbuf fballoc() tpalloc() fldkey. nth fldkey. value (char *) type (char *) type casting. value NULL. fldlen. type FB_CARRAY byte. 1, 1 fberror setting. fbchg_tu(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument. #include demo_fdl.h... long rcvlen, ret; char buffer[100]; FLDLEN fldlen; 21

23 FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, tperrno);... fbput(fbuf, INPUT, aaaa, 0); /* aaaa. */ ret = fbchg_tu(fbuf, INPUT, 1, bbbb, 4); /* bbbb. */ if (ret < 0) { error processing... ret = fbget_tu(fbuf, INPUT, 1, buffer, &fldlen); /* buffer. */ if (ret < 0) { error processing... printf( Field Data: [%s]\n, buffer); /* output : Field Data: [bbbb] */ fbprint(fbuf); /* output : aaaa, bbbb */... fbput(), fbchg_tut(), fbget_tu(), fbchg_tu(), fbgetval(), fbgetval_last_tu(),fbgetvals_tu(), fbgetvall_tu() 22

24 fbchg_tut fbchg_tut : int fbchg_tut(fbuf *fbuf, FLDKEY fldkey, int nth, char *value, FLDLEN fldlen, int type) fballoc() or tpalloc() input argument. fbchg_tu(). Input argument.,. fbuf fballoc() tpalloc() fldkey. nth fldkey. value argument char * char * type casting. fldlen. FB_CARRAY byte. type. type. : FB_CARRAY, FB_SHORT, FB_DOUBLE, FB_LONG, FB_INT, FB_STRING, FB_CHAR, FB_FLOAT 1, 1 fberror setting. fbchg_tut(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument.(fb_carray.) 23

25 FBETYPE FBEBADFLD : Tmax type. :. #include demo_fdl.h long ret, lval=100000; FBUF *fbuf; fbputt(fbuf, INPUT, "aaaa", 0, FB_STRING); fbchg_tut(fbuf, INPUT, 0, (char *)&lval, 0, FB_LONG); printf("1st occurrence of INPUT field is changed as follows : \n"); fbprint(fbuf);... /* fkey = , fname = INPUT, type = string, value = */ fbput(), fbchg_tu(), fbget_tu(), fbgetval(), fbgetval_last_tu(), fbgetvals_tu(), fbgetvall_tu() 24

26 fbdelall fbdelall : int fbdelall(fbuf *fbuf, FLDKEY fldkey) argument. argument. 1 fberror FBENOENT settinge. fbuf fballoc() tpalloc(), fldkey., 1 fberror setting. fbdelall(). fbdelall(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. #include demo_fdl.h int ret; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, INPUT, cccc, 0); ret = fbdelall(fbuf, INPUT); printf( Delete Field Number: [%d]\n, ret); /* output: Delete Field Number: [3] */... 25

27 fbput(), fbget(), fbdelete(), fbdelall_tu() 26

28 fbdelall_tu fbdelall_tu : int fbdelall_tu(fbuf *fbuf, FLDKEY *fldkey) argument. fbdelall_tu() fbdelall(). argument. index 0. fbuf fballoc() tpalloc(), fieldkey. fbdelall_tu(). fbdelall_tu(), fberrno. FBENOENT : fldkey fberror FBENOENT setting. #include demo_fdl.h FLDKEY fkey[3]; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, OUTPUT, cccc, 0); fkey[0] = INPUT; fkey[1] = OUTPUT; fkey[2] = 0; /* The last entry in the array must be 0 */ ret = fbdelall_tu(fbuf, fkey); 27

29 printf( The Number of deleted fields: [%d]\n, ret); /* output: Number of deleted fields: [3] */... fbput(), fbget(), fbdelete(), fbdelall() 28

30 fbdelete fbdelete : int fbdelete(fbuf *fbuf, FLDKEY fldkey, int nth) fballoc() tpalloc(). fbchg_tu() fbdelete() fberror FBENOENT setting. argument. fbuf fballoc() tpalloc(), fieldkey, nth. argument fbdelete() 1 fberror setting. 1. fbdelete(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. fberror FBENOENT setting. #include demo_fdl.h char buffer[100]; int ret; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); 29

31 fbput(fbuf, INPUT, aaaa, 0); /* fbuf 0 aaaa. */ fbput(fbuf, INPUT, bbbb, 0); /* fbuf 1 bbbb. */ fbput(fbuf, INPUT, cccc, 0); /* fbuf 2 cccc. */ fbdelete(fbuf, INPUT, 1); /* fbuf 1 bbbb. */ ret=fbdelete(fbuf, INPUT, 3); if(ret<0){ printf("fbdelete error : %s\n", fbstrerror(fberror)); /* fbuf 3 fbdelete error : FBENOENT (not found). */ fbget(fbuf, INPUT, buffer, 0); printf( INPUT: [%s]\n, buffer); /* output: INPUT: [aaaa] */ fbget(fbuf, INPUT, buffer, 0); printf( INPUT: [%s]\n, buffer); /* output: INPUT: [cccc] */... fbput(), fbget(), fbdelall(), fbdelall_tu() 30

32 fbextread fbextread : #include <stdio.h> #include <usrinc/fbuf.h> int fbextread(fbuf *fbuf, FILE *iop) iop fballoc() tpalloc(). fbuf fballoc() tpalloc() iop.. flag + flag : [flag] field_name or field_id (tab) field_value flag = : [flag] field_name1 or field_id1 (tab) field_name2 or field_id2 flag : [flag] field_name or field_id flag 4. + : 0. - : 0. = : (field_name1) 0 (field_name2) 0. # : comment ( ) : flag fbput(), flag + fbchg_tu(), - fbdelete(), = fbget_tu() fbchg_tu(). fbextread(). 1, 1 fberror setting. #include <stdio.h> #include <usrinc/atmi.h> 31

33 #include <usrinc/fbuf.h> #include "demo_fdl.h" int main() { long len; int ret; FILE *fp; FBUF *fbuf; FLDLEN fldlen; char buffer[100]; fbuf = (FBUF *)tpalloc("field", NULL, 0); if (fbuf == NULL) { printf("fbuf tpalloc fail[%d]\n", tperrno); ret = fbput(fbuf, INPUT, "user_input", 10); if (ret < 0) { printf("fbput fail[%d]\n", fberror); return -1; ret = fbput(fbuf, OUTPUT, "user_output", 10); if (ret < 0) { printf("fbput fail[%d]\n", fberror); return -1; ret = fbput(fbuf, STATLIN, "user_statlin", 10); if (ret < 0) { printf("fbput fail[%d]\n", fberror); return -1; fp = fopen("file", "r"); fbprint(fbuf); ret = fbextread(fbuf, fp); if (ret < 0) printf("fextread fail[%s]\n", fberror); printf("\n\n<after Fextread> \n"); fbprint(fbuf); tpfree((char *)fbuf); 1) +STATLIN statlin0_ 32

34 : user_input, user_output, statlin0_, user_statlin 2) OUTPUT OUTPUT0_ INPUT INPUT0_ INPUT INPUT1_ : user_input, user_output, user_statlin, OUTPUT0_, INPUT0_, INPUT1_ 3) =OUTPUT INPUT : user_input, user_input, user_statlin 4) INPUT : user_output, user_statlin fbput(), fbchg_tu(), fbdelete(), fbget_tu() 33

35 fbfldcount fbfldcount : int fbfldcount(fbuf *fbuf) fballoc() tpalloc(). API. fbfldcount().,. fbuf fballoc() tpalloc()., 0. #include demo_fdl.h int cnt; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, OUTPUT, cccc, 0); cnt = fbfldcount(fbuf); printf( Field Count: [%d]\n, cnt); /* output: Field Count: [3] */ fbgetnth(), fbkeyoccur() 34

36 fbfprint fbfprint : int fbfprint(fbuf *fbuf, FILE *iop)., fbprint(). fbuf fballoc() tpalloc(), iop. 1, 1 fberror setting. fbfprint(), fberrno. FBEBADFB :.. FBEINVAL : input argument argument. #include demo_fdl.h FILE *iop; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); iop = fopen( sample.text, w ); fbput(fbuf, INPUT, 5555, 0); fbput(fbuf, INPUT, 7777, 0); fbfprint(fbuf, iop); fclose(iop); fbprint() 35

37 fbfree fbfree : int fbfree(fbuf *fbuf) fballoc() tpalloc()... fbuf fballoc() tpalloc(). 1, 1. #include demo_fdl.h int ret; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); ret = fbfree(fbuf); printf( fbfree, ret = %d\n, ret); /* output : fbfree, ret = 1 */ fbput(fbuf, INPUT, bbbb, 0); fbprint(fbuf); /* an error occurs since memory was not allocated. */ fbcalcsize(), tpalloc(), fballoc(), fbinit() 36

38 fbftos fbftos : matching struct int fbftos(fbuf *fbuf, char *cstruct, char *stname) fballoc() tpalloc() matching C Structure (stname). ***.s. 1 : 1 mapping. C struct mapping. VIEW demo #type cname Fldkey count flag size null string demodata INPUT 5-20 carray carraydata CARRAYDATA 1-20 star char chardata CHARDATA c int inum INTDATA short snum SHORTDATA long lnum LONGDATA float fnum FLOATDATA double dnum DOUBLEDATA END type cname. fldkey mapping ( ***.f.) count. size string type null C Structure C Structure. null C Structure. string, carray, char NULL int, short, long 0, float, double 0.0. demo.s demo.v VIEW sdlc utility(structure file compiling utility) VIEW file. $TMAXDIR$/sample/sdl> sdlc c v demo.s o tmax.sdl 37

39 $TMAXDIR$/sample/sdl> sdlc c v demo.v o tmax.sdl (korn shell.profile) SDLFILE o.sdl. SDLFILE. VIEW ***.f. VIEW demo_sdl.h tmax.sdl. demo_sdl.h include. sdlc utility(structure file compiling utility) VIEW file. $TMAXDIR$/sample/sdl> sdlc v demo.s demo_sdl.c demo_sdl.h. demo_sdl.c demo_sdl.c. tmax.sdl. mapping. fbuf fballoc() tpalloc(), cstruct (char *) type casting. stname VIEW. cstruct 1, -1 fberror setting. fbftos(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument. FBEBADFLD :. fdlc utility fberror FBEBADFLD setting. FBEBADSTRUCT :. Tmax system. #include demo_fdl.h 38

40 #include demo_sdl.h int ret, fdllen, val = 1000; struct demo temp; FBUF *fbuf; Char *cstruct; if(tpstart((tpstart_t *)NULL) == -1) { printf( tpstart failed\n ); if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); cstruct = (char *)&temp; if(fbstinit((char *)&temp, demo ) < 1) { printf( fbstinit failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INTDATA, (char *)&val, 0); if(fbftos(fbuf, cstruct, demo ) < 0) { fbstof(), fbstinit(), fbstelinit() 39

41 fbget fbget : int fbget(fbuf *fbuf, FLDKEY fldkey, char *loc, FLDLEN *fldlen) argument. argument loc.... fbuf fballoc() tpalloc(), fieldkey, loc. type casting. fldlen. 1 fberror setting. 1. fbget(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBEINVAL : input argument argument. (CARRAY fldlen.) FBETYPE : Tmax type. #include demo_fdl.h long rcvlen, ret; FLDLEN fldlen; char buffer[100]; 40

42 FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, INPUT, cccc, 0); fbget(fbuf, INPUT, buffer, &fldlen); printf( Field Data: [%s]\n, buffer); /* output: Field Data: [aaaa] */ fbput(), fbchg_tu(), fbget_tu(), fbchg_tu(), fbgetval(), fbgetval_last_tu(), fbgetvals_tu(), fbgetvall_tu() 41

43 fbgetalloc_tu fbgetalloc_tu : char *fbgetalloc_tu(fbuf *fbuf, FLDKEY fldkey, int nth, int *extralen) argument argument. extralen 0 setting. extralen.. fbuf fballoc() tpalloc(), fieldkey, nth. extralen. NULL fberror setting.. fbgetalloc_tu(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBEMALLOC :, fberror FBEMALLOC setting. FBEINVAL : input argument argument. FBETYPE : Tmax type. #include demo_fdl.h long ret; int extralen; char *buffer; 42

44 FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, INPUT, cccc, 0); extralen = 4; buffer = fbgetalloc_tu(fbuf, INPUT, 0, &extralen); printf( Field Data: [%s]\n, buffer); /* output: Field Data: [aaaa], returned after adding 4 bytes to the length of the field value. */ fbfree(fbuf);. fbgetalloc_tut(), fbput(), fbchg_tu(), fbget_tu(), fbchg_tu(), fbgetval(), fbgetval_last_tu(), fbgetvals_tu(), fbgetvall_tu() 43

45 fbgetalloc_tut fbgetalloc_tut :. char *fbgetalloc_tut(fbuf *fbuf, FLDKEY fldkey, int nth, int type, int *extralen) argument argument. fbgetalloc_tut() fbgetalloc_tu(). char * int, long, double, long, float type casting. extralen 0 setting. extralen.. fbuf fballoc() tpalloc(), fieldkey, nth. type, extralen byte. type. : FB_CARRAY, FB_SHORT, FB_DOUBLE, FB_LONG, FB_STRING, FB_CHAR, FB_FLOAT, FB_INT NULL fberror setting.. fbgetalloc_tut(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBEMALLOC :. fberror FBEMALLOC setting. FBENOSPACE : fberror FBENOSPACE setting. FBEBADFLD :. fdlc 44

46 FBETYPE utility fberror FBEBADFLD setting. : Tmax type. #include demo_fdl.h long ret; int extralen; char *buffer; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, INPUT, cccc, 0); extralen = 4; buffer = fbgetalloc_tut(fbuf, INPUT, 0, FB_STRING, &extralen); printf( Field Data: [%s]\n, buffer); /* output: Field Data: [aaaa], returned after adding 4 bytes to the length of the field value. */ fbfree(fbuf); fbgetalloc_tu (), fbput(), fbget_tu(), fbchg_tu(), fbgetval(), fbgetval_last_tu(), fbgetvals_tu(), fbgetvall_tu() 45

47 fbget_fbsize fbget_fbsize : long fbget_fbsize(fbuf *fbuf) fballoc() tpalloc(). fballoc() tpalloc() 1024 byte 1024 byte fbget_fbsize() 1024 byte. fbget_fbsize() fbcalcsize(). fbuf fballoc() tpalloc().. #include demo_fdl.h long ret; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, 1111, 0); ret = fbget_fbsize(fbuf ) ; printf( Field Buffer Size: [%ld]\n, ret); /* output: Field Buffer Size: [1024] */ fbcalcsize(), tpalloc(), fballoc(), fbfree(), fbinit() 46

48 fbget_fldkey fbget_fldkey : matching FLDKEY fbget_fldkey(char *name) fdlc utility (FDLFILE fdl ) matching (identifier).. name... fbget_fldkey() 0 matching. #include demo_fdl.h FLDKEY fkey; FBUF *sndbuf; fkey = fbget_fldkey( INPUT ); printf( Field Key : [%d]\n, fkey); /* output : Field Key : [ ] */ fbput(sndbuf, fkey, 1111", 0); fbget_fldname(), fbget_fldno(), fbget_fldtype(), fbget_strfldtype(), fbtypecvt() 47

49 fbget_fldname fbget_fldname : matching char *fbget_fldname(fldkey fldkey) fbget_fldkey(), fbget_fldname() fdlc utility (FDLFILE fdl ) matching. fldkey (***.f) fdlc utility (***_fdl.h) fbget_fldkey(). NULL matching. #include demo_fdl.h FLDKEY fkey; char *name; fkey = fbget_fldkey( INPUT ); printf( Field Key : [%d]\n, fkey); /* output : Field Key : [ ] */ name = fbget_fldname(fkey); printf( Field Name : [%s]\n, name); /* output : Field Name : [INPUT] */ fbget_fldkey(), fbget_fldno(), fbget_fldtype(), fbget_strfldtype(), fbtypecvt() 48

50 fbget_fldno fbget_fldno : matching int fbget_fldno(fldkey fldkey),, unique.. fbget_fldno() matching. fldkey (***.f) fdlc utility (***_fdl.h)fbget_fldkey(). matching. #include demo_fdl.h" FLDKEY fkey; int no; fkey = fbget_fldkey( INPUT ); printf( Field Key : [%d]\n, fkey); /* output : Field Key : [ ] */ no = fbget_fldno(fkey); printf( Field No. : [%d]\n, no); /* output : Field No. : [101] */ fbget_fldname(), fbget_fldkey(), fbget_fldtype(), fbget_strfldtype(), fbtypecvt() 49

51 fbget_fldtype fbget_fldtype : int fbget_fldtype(fldkey fldkey). matching. RETURN VALUE (real type number) (real type number) Field type 1 character 2 short integer 3 integer 4 long integer 5 float 6 double 7 string 8 character array(carray) fldkey (***.f) fdlc utility (***_fdl.h) fbget_fldkey(). 1~8 int. #include demo_fdl.h FLDKEY fkey; int type; fkey = fbget_fldkey( INPUT ); printf( Field Key : [%d]\n, fkey);/* output: Field Key : [ ] */ type = fbget_fldtype(fkey); printf( Field Type : [%d]\n, type);/* output : Field Type : [7] */ 50

52 fbget_fldname(), fbget_fldno(), fbget_fldkey(), fbget_strfldtype(), fbtypecvt() 51

53 fbgetlast_tu fbgetlast_tu : int fbgetlast_tu(fbuf *fbuf, FLDKEY fldkey, int *nth, char *loc, int *len).. fbuf fballoc() tpalloc(), fieldkey, nth. nth. loc, len. -1 fberror setting. 1. fbgetlast_tu(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBEINVAL : input argument argument. FBETYPE : Tmax type. FBEBADFLD :. #include demo_fdl.h long ret; FLDKEY len; int nth; char buffer[100]; FBUF *fbuf; 52

54 if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, INPUT, cccc, 0); fbgetlast_tu(fbuf, INPUT, &nth, buffer, &len); printf( Field Data: [%s], occurrence = %d, len = %d\n, buffer, nth, len); /* output: Field Data: [cccc], occurrence = 2, len = 4 */ fbput(), fbchg_tu(), fbget_tu(), fbgetval(), fbgetval_last_tu(), fbgetvals_tu(), fbgetvall_tu(), fbgetalloc_tu() 53

55 fbget_strfldtype fbget_strfldtype : char *fbget_strfldtype(fldkey fldkey). fbget_fldtype(). fldkey (***.f) fdlc utility (***_fdl.h) fbget_fldkey(). Argument. #include demo_fdl.h FLDKEY fkey; char *stype;.. fkey = fbget_fldkey( INPUT ); printf( Field Key : [%d]\n, fkey); /* output : Field Key : [ ] */ stype = fbget_strfldtype(fkey); printf( Field Type : [%s]\n, stype); /* output : Field type : [string] */ fbget_fldname(), fbget_fldno(), fbget_fldtype(), fbtypecvt() 54

56 fbget_tu fbget_tu : int fbget_tu(fbuf *fbuf, FLDKEY fldkey, int nth, char *value, FLDLEN *len) argument argument. fbget() fbget() fbget_tu(). fbget() access fbget_tu(). fbuf fballoc() tpalloc(), fieldkey, nth. value. type casting. fldlen. value len. 1 fberror setting. 1. fbget_tu(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBEINVAL : input argument argument. FBETYPE : Tmax type. FBEBADFLD :. #include demo_fdl.h char buffer[100]; 55

57 long rcvlen; FLDLEN fldlen; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, OUTPUT, cccc, 0); fbget_tu(fbuf, INPUT, 1, buffer, &fldlen); printf( Data: [%s]\n, buffer) /* output: Data: [bbbb] */... fbput(), fbget(), fbget_tut(), fbgetval(), fbgetval_tu(), fbgetvals_tu(), fbgetvall_tu(), fbgetval_last_tu() 56

58 fbget_tut fbget_tut : int fbget_tut(fbuf *fbuf, FLDKEY fldkey, int nth, char *value, FLDLEN *len, int type) argument argument. fbget_tu() fbget_tu() fbget_tut(). fbuf fballoc() tpalloc(), fieldkey, nth. value. prototype type casting. fldlen, type. type. : FB_CARRAY, FB_SHORT, FB_DOUBLE, FB_LONG, FB_STRING, FB_CHAR, FB_FLOAT, FB_INT value len. 1 fberror setting. 1. fbget_tut(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBETYPE : Tmax type. FBEBADFLD :. #include demo_fdl.h FBUF *fbuf; int ret, val=65; 57

59 if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbputt(fbuf, INPUT, (char *)&val, 0, FB_INT); fbputt(fbuf, INTDATA, "1111", 0, FB_STRING); fbprint(fbuf); fbget_tut(fbuf, INTDATA, 0, (char *)&ret, &fldlen, FB_INT); printf("field Data: [%d]\n", ret); /* output: Field Data: [1111] */... fbput(), fbget(), fbget_tu(), fbgetval(), fbgetval_tu(), fbgetvals_tu(), fbgetvall_tu(), fbgetval_last_tu() 58

60 fbget_unused fbget_unused : long fbget_unused(fbuf *fbuf) fballoc() tpalloc() byte. fbuf fballoc() tpalloc(). byte. #include demo_fdl.h long ret; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, 1111, 0); ret = fbget_unused (fbuf); printf( Unused Buffer Size: [%d]\n, ret); /* output: Unused Buffer Size: [1000] */ fbcalcsize(), fbget_fbsize(), fbget_used() 59

61 fbget_used fbget_used : long fbget_used(fbuf *fbuf) fballoc() tpalloc() byte. fbuf fballoc() tpalloc(). byte. #include demo_fdl.h long ret; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, 1111, 0); ret = fbget_used(fbuf); printf( Used Buffer Size: [%d]\n, ret); /* output: Used Buffer Size: [24] */ fbcalcsize(), fbget_fbsize(), fbget_unused() 60

62 fbgetf fbgetf : int fbgetf(fbuf *fbuf, FLDKEY fldkey, char *loc, int *fldlen, int *pos) fballoc() tpalloc(). fbgetf() fbget() fbget(). (e.g. Visual Basic 20,000, fbget() 400, fbgetf() 2.5.) pos fbgetf(), fbgetf() 0. fbuf fballoc() tpalloc(), fldkey, loc, fldlen. pos. 1 fberror setting. 1. fbgetf(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBEINVAL : input argument argument. FBETYPE : Tmax type. #include demo_fdl.h int ret, int0_pos, str0_pos, fldlen; char str0[30]; FBUF *fbuf; if ((fbuf = fballoc(20000, )) == NULL) { printf( fballoc failed, errno = %d\n, fberror); 61

63 int0_pos = str0_pos = 0; while(1) { ret = fbgetf(fbuf, STR0, (char *)str0, (int *)&fldlen, &str0_pos); if(ret < 0) { printf( FBERROR at STR0:%d\n, fberror); break; ret = fbgetf(fbuf, INT0, (char *)&int0, (int *)&fldlen, &int0_pos); if(ret < 0) {... fbget(), fbgetval(), fbget_tu(), fbgetvals(), fbgetvali(), fbgetvalt(), fbgetvall_tu() 62

64 fbgetlen fbgetlen : int fbgetlen(fbuf *fbuf, FLDKEY fldkey, int nth) fballoc() tpalloc(). fbuf fballoc() tpalloc(), fldkey, nth. 1 fberror setting.. fbgetlen(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBEBADFLD :. fdlc utility fberror FBEBADFLD setting. #include demo_fdl.h int ret; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); if(fbgetlen(fbuf, INPUT, 1) < 0) {

65 fbget_fbsize(), fbget_used(), fbget_unused(), fbcalcsize() 64

66 fbgetnth fbgetnth : int fbgetnth(fbuf *fbuf, FLDKEY fldkey, char *value, FLDLEN fldlen) argument (fldkey) argument(*value).. fbuf fballoc() tpalloc(), fieldkey, value. type casting. fldlen FB_CARRAY 0. 1 fberror setting.. fbgetnth(), fberrno. FBEINVAL : input argument argument. #include demo_fdl.h int occ; FBUF *fbuf;... if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); 65

67 fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, INPUT, ddddd, 0); fbput(fbuf, INPUT, eeeee, 0); fbput(fbuf, OUTPUT, cccc, 0); occ = fbgetnth(fbuf, INPUT, eeee, 0); printf( Occurrence: [%d]\n, occ); /* output: Occurrence: [3] */... fbfldcount(), fbkeyoccur(), fbgetntht() 66

68 fbgetntht fbgetntht : int fbgetntht(fbuf *fbuf, FLDKEY fldkey, char *value, FLDLEN fldlen, int fromtype) fbgetntht() fbgetnth() fldkey value. fromtype fldkey value value, fldlen, fbgetnth(). fbgetntht() value matching. fbuf fballoc() tpalloc(), fieldkey, value. type casting. fldlen FB_CARRAY 0. fromtype value. type. : FB_CARRAY, FB_SHORT, FB_DOUBLE, FB_LONG, FB_STRING, FB_CHAR, FB_FLOAT, FB_INT 1 fberror setting.. fbgetntht(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument. FBETYPE : Tmax type. FBEBADFLD :. fdlc 67

69 utility fberror FBEBADFLD setting. #include demo_fdl.h int occ, val; FBUF *fbuf;... if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); val = 1111; fbput(fbuf, INPUT, "aaaa", 0); fbput(fbuf, INPUT, "dddd", 0); fbput(fbuf, INPUT, 1111, 0); fbput(fbuf, OUTPUT, "cccc", 0); occ=fbgetntht(fbuf, INPUT, (char *)&val, 0, FB_INT); printf("occurrence: [%d]\n", occ); /* Occurrence: [2] */ fbfldcount(), fbkeyoccur(), fbgetnth() 68

70 fbgetval fbgetval : char *fbgetval(fbuf *fbuf, FLDKEY fldkey, int nth, FLDLEN *fldlen) argument argument.. fbgetval(). alignment. long double casting. fbgetvalt(). fbgetval() fbget_tu(). fbget_tu() argument fbgetval(). fbuf fballoc() tpalloc(), fieldkey, nth. value. type casting. fldlen. NULL fberror setting.. fbgetval(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. #include demo_fdl.h char *ptr; long rcvlen; FLDLEN fldlen; FBUF *fbuf; 69

71 fbuf = fballoc(10, 100);... fbput(fbuf, INPUT, "aaaa", 0); fbput(fbuf, INPUT, "bbbb", 0); ptr=fbgetval(fbuf, INPUT, 0, &fldlen); printf("data: [%s]\n", ptr); /* output: Data: [aaaa] */ printf("len = %d\n", fldlen); /* len = 4 */... fbput(), fbget(), fbgetval(), fbgetvalt(), fbgetval_tu(), fbgetvals_tu(), fbgetvall_tu(), fbgetval_last_tu() 70

72 fbgetvali fbgetvali : int fbgetvali (FBUF *fbuf, FLDKEY fldkey, int nth) argument argument.., aaaa 0. fbuf fballoc() tpalloc(), fieldkey, nth. 0 fberror setting. fbgetvali(). fbgetvali(), fberrno. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument. FBETYPE : Tmax type. FBEBADFLD :. fdlc utility fberror FBEBADFLD setting. FBENOENT fberror FBENOENT setting. #include demo_fdl.h int cnt; int vali; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { 71

73 printf( fballoc failed, errno = %d\n, fberror); cnt=111; fbput(fbuf, TOTMON, (char *)&cnt, 0); fbput(fbuf, INPUT, "aaaa", 0); vali=fbgetvali(fbuf, TOTMON, 0); printf("field Data: [%d]\n", vali); /* output: Field Data: [111] */ vali = fbgetvali(fbuf, INPUT, 0); printf("field Data : [%d]\n", vali); /* output: Field Data: [0] */ fbfree(fbuf);... fbput(), fbget(), fbgetval(), fbgetvalt(), fbgetval_tu(), fbgetvals_tu(), fbgetvall_tu(), fbgetval_last_tu() 72

74 fbgetval_last_tu fbgetval_last_tu : char *fbgetval_last_tu(fbuf *fbuf, FLDKEY fldkey, int *nth, FLDLEN *fldlen) argument.. fbgetlast_tu(). fbgetlast_tu() argument fbgetval_last_tu(). fbgetlast_tu() fbgetval_last_tu() argument. fbuf fballoc() tpalloc(), fieldkey, nth, fldlen. NULL fberror setting. char. fbgetval_last_tu(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. #include demo_fdl.h char *ptr; long rcvlen; int i,occ ; FLDLEN fldlen; FBUF *fbuf; 73

75 if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, INPUT, ddddd, 0); fbput(fbuf, INPUT, eeeee, 0); fbput(fbuf, OUTPUT, cccc, 0); ptr = fbgetval_last_tu(fbuf, INPUT, &occ, &fldlen); printf( Data: [%s], Occurrence: [%d]\n, ptr, occ); /* output: Data: [eeeee], Occurrence: [3] */ for (i = 0; i < occ; i++) { ptr = fbgetval(fbuf, INPUT, i, &fldlen); printf( Data: [%s]\n, ptr);... fbput(), fbget(), fbgetval(), fbgetvalt(), fbgetval_tu(), fbgetvals_tu(), fbgetvall_tu(), fbgetval_last_tu(), fbgetlast_tu() 74

76 fbgetvall_tu fbgetvall_tu : long type long fbgetvall_tu(fbuf *fbuf, FLDKEY fldkey, int nth) argument argument short, int, long long type. fbgetval() fbgetval() fbgetvall_tu() long type. long type typefbgetvall_tu() 0. fbuf fballoc() tpalloc(), fieldkey, nth. short, int, long 0, fberror setting. fbgetvall_tu() long type. fbgetvall_tu(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBETYPE : Tmax type. short, int, long fldkey. #include demo_fdl.h long lval; short sval; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); 75

77 sval = 111; fbput(fbuf, INPUT, (char *)&sval, 0); lval = fbgetvall_tu(fbuf, INPUT, 0); printf( Field Data: [%ld]\n, lval); /* output: Field Data: [111] */... fbput(), fbget(), fbgetval(), fbgetvalt(), fbgetval_tu(), fbgetvals_tu(), fbgetval_last_tu() 76

78 fbgetvals fbgetvals : char *fbgetvals (FBUF *fbuf, FLDKEY fldkey, int nth) argument argument. fbgetval() fbgetval(), fbgetvals(). fbuf fballoc() tpalloc(), fieldkey, nth. NULL, fberror setting. fbgetvals(). fbgetvals(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument. FBEBADFLD :. fdlc utility fberror FBEBADFLD setting. #include demo_fdl.h char *ptr; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); 77

79 fbput(fbuf, INPUT, aaaa, 0); ptr = fbgetvals(fbuf, INPUT, 0); printf( Field Data: [%s]\n, ptr); /* output: Field Data: [aaaa] */... fbput(), fbget(), fbgetval(), fbgetvalt(), fbgetval_tu(), fbgetvals_tu(), fbgetvall_tu(), fbgetval_last_tu() 78

80 fbgetvals_tu fbgetvals_tu : char *fbgetvals_tu(fbuf *fbuf, FLDKEY fldkey, int nth) argument argument string. fbgetval() fbgetval() fbgetvals_tu(). fbgetvals(). fbgetvals() NULL fbgetvals_tu() ( ). fbgetvals(), fbgetvals_tu() string. argument fbgetvals_tu() ( ). fbuf fballoc() tpalloc(), fieldkey, nth. ( ), fbgetvals_tu(). #include demo_fdl.h char *ptr; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); ptr = fbgetvals_tu(fbuf, INPUT, 1); printf( Field Data: [%s]\n, ptr); /* output: Field Data: [bbbb] */... 79

81 fbget(), fbgetval(), fbgetvalt(), fbgetvals(), fbgetval_tu(), fbgetvall_tu(), fbgetval_last_tu() 80

82 fbgetvalt fbgetvalt : char *fbgetvalt(fbuf *fbuf, FLDKEY fldkey, int nth, FLDLEN *fldlen, int totype) argument argument (totype). fbgetval() alignment. long double casting. fbgetvalt() fbget_tut(). fbget_tut() argument fbgetvalt(). fbget_tut() fbgetvalt() argument. fbgetval() fbgetval() fbgetvalt(). fbuf fballoc() tpalloc(), fieldkey, nth. value. type casting. fldlen. type. : FB_CARRAY, FB_SHORT, FB_DOUBLE, FB_LONG, FB_STRING, FB_CHAR, FB_INT, FB_FLOAT NULL fberror setting. char. fbgetvalt(), fberrno. FBENOENT : FDLFILE( : default tmax.fdl) fberror FBENOENT setting. FBENOSPACE : fberror FBENOSPACE setting. 81

83 FBEINVAL FBEBADFLD : input argument argument. :. fdlc utility fberror FBEBADFLD setting. #include demo_fdl.h int *ptr; long rcvlen; FLDLEN fldlen; FBUF *fbuf; Int totype; Int val = 111; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, INPUT, (char *)&val, 0, FB_INT); ptr = fbgetvalt(fbuf, INPUT, 2, &fldlen, FB_INT); printf( Data: [%d]\n, ptr); /* output: Data: [111] */... fbput(), fbget(), fbgetval(), fbgetval_tu(), fbgetvals_tu(), fbgetvall_tu(), fbgetval_last_tu() 82

84 fbinit fbinit : int fbinit(fbuf *fbuf, FLDLEN buflen) fballoc() tpalloc(). fballoc() tpalloc().. fbuf fballoc() tpalloc(), buflen. 1, fberror setting. 1. fbinit(), fberrno. FBENOSPACE : fberror FBENOSPACE setting. buflen fbuf setting. #include demo_fdl.h FBUF *fbuf; int ret; long size; size = fbcalcsize(10, 100); if ((fbuf = (FBUF *)tpalloc( FIELD, NULL, size)) == NULL) { printf( tpalloc failed, errno = %d\n, tperrno); ret = fbinit(fbuf, size); printf( fbinit, ret : [%d]\n, ret); /* fbinit, ret: [1] */ 83

85 fbcalcsize(), tpalloc(), fballoc() 84

86 fbinsert fbinsert : int fbinsert(fbuf *fbuf, FLDKEY fldkey, int nth, char *value, int fldlen) fballoc() tpalloc() argumentargument. fbinsert() argument. nth.. fbuf fballoc() tpalloc(), fieldkey, nth. value. type casting. fldlen. FB_CARRAY argument 0. 1, fberror setting. 1. fbinsert(), fberrno. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument. ( nth carray setting.) FBETYPE : Tmax type. #include demo_fdl.h 85

87 long rcvlen, ret; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbinsert(fbuf, INPUT, 0, aaaa, 0); fbinsert (fbuf, INPUT, 1, bbbb, 0); fbinsert (fbuf, INPUT, 2, cccc, 0);... fbput(), fbchg_tu(), fbget_tu(), fbgetval(), fbgetval_last_tu(), fbgetvals_tu(), fbgetvall_tu() 86

88 fbisfbuf fbisfbuf : int fbisfbuf(fbuf *fbuf) fballoc() tpalloc(). fbisfbuf(). fbuf #include demo_fdl.h FBUF *fbuf; int ret; if ((fbuf = (FBUF *)tpalloc( FIELD, NULL, 0)) == NULL) { printf( tpalloc failed, errno = %d\n, tperrno); ret = fbisfbuf(fbuf); printf( ret : [%d]\n, ret); /* output : ret : [1] */ fballoc(), tpalloc() 87

89 fbispres fbispres : int fbispres(fbuf *fbuf, FLDKEY fldkey, int nth) argument. fbuf fballoc() tpalloc(), fieldkey, nth. 1, 0. #include demo_fdl.h int ret; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror);... fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); ret = fbispres(fbuf, INPUT, 1); printf( Field Occ: [%d]\n, ret); /* output: Field Occ: [1] */ fbgetnth(), fbfldcount(), fbkeyoccur() 88

90 fbkeyoccur fbkeyoccur : int fbkeyoccur(fbuf *fbuf, FLDKEY fldkey) argument. fbfldcount() (1 ) fbkeyoccur(). fbuf fballoc() tpalloc(), fieldkey. 0. #include demo_fdl.h int cnt; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, OUTPUT, cccc, 0); cnt = fbkeyoccur(fbuf, INPUT); printf( Field Count: [%d]\n, cnt); /* output: Field Count: [2] */... fbgetnth(), fbfldcount() 89

91 fbmake_fldkey fbmake_fldkey : FLDKEY fbmake_fldkey(int type, int no) (***.f). Tmax system unique argument.. - type no-. type, no. type. : FB_CARRAY, FB_SHORT, FB_DOUBLE, FB_LONG, FB_STRING, FB_CHAR, FB_INT, FB_FLOAT type no. #include demo_fdl.h FLDKEY fkey; fkey = fbmake_fldkey(fb_string, 101); printf( Field Key : [%d]\n, fkey); /* output : Field Key : [ ] */ fbget_fldkey() 90

92 fbnext_tu fbnext_tu : int fbnext_tu(fbuf *fbuf, FLDKEY *fldkey, int *nth, char *value, int *len) fldkey. FIRSTFLDKEY. fbuf fballoc() tpalloc(), fieldkey. nth, value. value NULL value, value NULL value fldkey nth. len. len. len value. fbnext_tu() 1 fldkey, nth, value, len. 0, 1 fberror setting. fbnext_tu(), fberrno. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument. #include demo_fdl.h char data[100]; long rcvlen; int i, occ, nth, fc, len; FLDKEY fkey; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { 91

93 printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INPUT, bbbb, 0); fbput(fbuf, INPUT, dddd, 0); fbput(fbuf, INPUT, eeee, 0); fbput(fbuf, INPUT, cccc, 0); len = 4; for(fkey = FIRSTFLDKEY;fc = fbnext_tu(fbuf, &fkey, &occ, data, &len) > 0; len = sizeof(data)) printf( fkey = %ld Data: [%s], Occurrence: [%d] len [%d]\n, fkey, data, occ, len); /* output: fkey = Data: [aaaa], Occurrence: [0] len [4] output: fkey = Data: [bbbb], Occurrence: [0] len [4] output: fkey = Data: [dddd], Occurrence: [0] len [4] output: fkey = Data: [eeee], Occurrence: [0] len [4] output: fkey = Data: [cccc], Occurrence: [0] len [4] */ fbput(), fbget(), fbgetval(), fbgetvalt(), fbgetval_tu(), fbgetvals_tu(), fbgetvall_tu(), fbgetval_last_tu(), fbgetlast_tu() 92

94 fbprint fbprint : int fbprint(fbuf *fbuf)... fkey = , fname = INPUT, type = string, value = 5555 fkey = , fname = INPUT, type = string, value = 7777 fkey = , fname = INPUT, type = string, value = 3333 fkey = , fname = INPUT, type = string, value = 8888 fbuf fballoc() tpalloc(). -1 fberror setting. 1. fbprint(), fberrno. FBEINVAL : input argument argument. FBEBADFB :.. #include demo_fdl.h FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, 5555, 0); fbput(fbuf, INPUT, 7777, 0); fbput(fbuf, INPUT, 3333, 0); fbput(fbuf, INPUT, 8888, 0); 93

95 fbprint(fbuf);... fbfprintf() 94

96 fbput fbput : int fbput(fbuf *fbuf, FLDKEY fldkey, char *value, FLDLEN len) fballoc() tpalloc(). argument value, value 1. fbput() fbinsert(). prototype value char * string type type casting. prototype FB_INT, FB_LONG, FB_FLOAT. fbuf fballoc() tpalloc(), fldkey, value, len value. FB_CARRAY 0. 1, fberror setting. 1 fbput(), fberrno. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument. FBETYPE : Tmax type. #include demo_fdl.h long rcvlen, ret; 95

97 FBUF *fbuf; int ival = 1000; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); fbput(fbuf, INPUT, aaaa, 0); fbput(fbuf, INTDATA, (char *)&ival, 0); fbinsert(), fbchg_tu(), fbget_tu(), fbgetval(), fbgetval_last_tu(), fbgetvals_tu(), fbgetvall_tu() 96

98 fbputt fbputt : int fbputt(fbuf *fbuf, FLDKEY fldkey, char *value, FLDLEN len, int type) fballoc() tpalloc(). fbputt() fbput() fbput() fbputt()., value. fbuf fballoc() tpalloc(), fldkey, value, len value. FB_CARRAY 0. type. type. type. : FB_CARRAY, FB_SHORT, FB_DOUBLE, FB_LONG, FB_STRING, FB_CHAR, FB_INT, FB_FLOAT 1, fberror setting. 1 fbputt(), fberrno. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument. FBETYPE : Tmax type. FBEBADFLD :. fdlc utility fberror FBEBADFLD setting. #include demo_fdl.h 97

99 long rcvlen, ret; FBUF *fbuf; int ival; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); ival = 1111; fbputt(fbuf, INPUT, aaaa, 0, FB_STRING); /* string INPUT int ival(1111) FB_INT. */ fbputt(fbuf, INPUT, (char *)&ival, 0, FB_INT);. fbprint(fbuf); fbfree(fbuf); /* output : fkey = , fname = NAME, type = string, value = aaaa fkey = , fname = NAME, type = string, value = 1111 */... fbinsert(), fbchg_tu(), fbget_tu(), fbgetval(), fbgetval_last_tu(), fbgetvals_tu(), fbgetvall_tu() 98

100 fbrealloc fbrealloc : FBUF *fbrealloc(fbuf *fbuf, int ncount, int nlen) fballoc() tpalloc(). fbuf fballoc() tpalloc(), ncount nlen., NULL fberror setting. fbrealloc(), fberrno. FBEOS : Operating System System error (, Tmax system (e.g., send, recv, etc)) network. #include demo_fdl.h FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); printf( Buffer Size: [%ld]\n, fbget_fbsize(fbuf)); /* output: Buffer Size: [1024] */ if ((fbuf = (FBUF *)fbrealloc(fbuf, 1000, 150)) == NULL) { printf( fbrealloc failed, errno = %d\n, fberror); printf( Buffer Size: [%ld]\n fbget_fbsize(fbuf)); /* output: Buffer Size: [4158] */ 99

101 fballoc(), tpalloc(), fbget_fbsize(), fbget_used(), fbget_unused() 100

102 fbread fbread : int fbread(fbuf *fbuf, FILE *iop) argument fballoc() tpalloc(). fbwrite().. fbuf fballoc() tpalloc(), iop. 1, -1 fberror setting. fbread(), fberrno. FBEINVAL : input argument argument. FBEOS : Operating System System error (, Tmax system (e.g., send, recv, etc)) network. #include demo_fdl.h int ret; FILE *iop; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); iop = fopen( sample.dat, r ); ret = fbread(fbuf, iop); if (ret == 1) fbprint(fbuf); 101

103 fclose(iop)... fbwrite() 102

104 fbsnull fbsnull : NULL int fbsnull(char *cstruct, char *cname, int nth, char *stname) mapping NULL. cstruct (char *) type casting. cname, nth. stname VIEW. NULL 1, NULL 0 1 fberror setting. fbsnull(), fberrno. FBEBADSTRUCT :. Tmax system. #include demo_fdl.h #include demo_sdl.h int val = 1000, ret; struct demo temp; char *cstruct; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); if(tpstart((tpstart_t *)NULL) == NULL) { printf(tpstart error\n ); 103

105 cstruct = (char *)&temp; if(fbstinit(cstruct, demo ) < 0) { fbput(fbuf, INPUT, aaaa, 0); if(fbftos(fbuf, cstruct, demo ) < 0) { ret = fbsnull(cstruct, demodata, 0, demo ); if(ret < 0) { printf( fbsnull failed\n ); else if(ret == 0) printf( This occurrence is not null\n ); else printf( This occurrence is null\n ); fbgetlen(), fbstinit(), fbstelinit(), fbinit() 104

106 fbstelinit fbstelinit : NULL int fbstelinit(char *cstruct, char *cname, char *stname) input argument NULL. 0 NULL. cstruct (char *) type casting. cname, (char *) type casting, stname VIEW. 1, 1 fberror setting. fbstelinit(), fberrno. FBEBADSTRUCT :. Tmax system. #include demo_fdl.h #include demo_sdl.h cstruct demo temp; char *cstruct; if(tpstart((tpstart_t *)NULL) == NULL) { printf( tpstart failed\n );... cstruct = (char *)&temp; if(fbstelinit(cstruct, demodata, demo ) < 0) {

107 fbstinit(), fbinit(), fbsnull() 106

108 fbstinit int fbstinit(char *cstruct, char *stname) input argument. fbstelinit() fbstinit(). fbstelinit() fbstinit(). cstruct (char *) type casting. stname VIEW. 1, 1 fberror setting. fbstinit(), fberrno. FBEBADSTRUCT :. Tmax system. #include demo_fdl.h #include demo_sdl.h cstruct demo temp; char *cstruct; if(tpstart((tpstart_t *)NULL) == NULL) { printf( tpstart failed\n );... cstruct = (char *)&temp; if(fbstinit(cstruct, demo ) < 0) {

109 fbstelinit(), fbinit(), fbsnull() 108

110 fbstof fbstof : struct matching int fbstof(fbuf *fbuf, char *cstruct, int mode, char *stname) C structure (stname) matching. fbftos(). ***.s VIEW -. 1 : 1 mapping. VIEW fbftos(). fbstof() input argument mode. mode. FBUPDATE, FBJOIN, FBOJOIN, FBCONCAT mode fbbufop() fbbufop(). FBUPDATE mode NULL. fbuf fballoc() tpalloc(), cstruct (char *) type casting. mode, stname VIEW. fbstof() fbftos() C Structure. 1. VIEW null 2. fbftos() C Structure VIEW null C Structure fbstof() null. VIEW null fbftos() C Structure fbftos() C Structure fbstof(). 109

111 1, -1 fberror setting. fbstof(), fberrno. FBENOSPACE : fberror FBENOSPACE setting. FBETYPE Tmax type. FBEINVAL : input argument argument. FBEBADFLD :. fdlc utility fberror FBEBADFLD setting. FBEBADSTRUCT :. Tmax system. FBEMALLOC :. fberror FBEMALLOC setting. #include demo_fdl.h #include demo_sdl.h int ret, fdllen, val = 1000; struct demo temp; FBUF *fbuf; Char *cstruct; if(tpstart((tpstart_t *)NULL) == -1) { printf( tpstart failed\n ); if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); cstruct = (char *)&temp; if(fbstinit((char *)&temp, demo ) < 1) { printf( fbstinit failed, errno = %d\n, fberror); strcpy(temp.demodata, aaaa ); temp.num = 1000; 110

112 if(fbstof(fbuf, cstruct, FBUPDATE, demo ) < 0) { fbftof(), fbbufop(), fbstinit(), fbstelinit(), fbsnull() 111

113 fbstrerror fbstrerror : char *fbstrerror(int fberror) API. API fberror setting. fberror input argument. FDL fbuf.h. NULL. #include demo_fdl.h int ret; FBUF *fbuf; if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); ret = fbget(fbuf, INPUT, aaaa, 0); if( ret < 0 ) printf( ret = %d, fberror = %s[%d]\n, ret, fbstrerror(fberror), fberror); /* output : ret = -1, fberror = not found[6] */ fberror() 112

114 fbtypecvt fbtypecvt : char *fbtypecvt(fldlen *tolen, int totype, char *fromval, int fromtype, FLDLEN fromlen) fromval fromtype totype. fbtypecvt() tolen. NULL.. tolen, totype. fromval, fromtype fromval, fromlen fromtype. type. : FB_CARRAY, FB_SHORT, FB_DOUBLE, FB_LONG, FB_STRING, FB_CHAR, FB_INT, FB_FLOAT fbtypecvt() NULL fberror setting.. fbtypecvt(), fberrno. FBENOSPACE : fberror FBENOSPACE setting. FBEINVAL : input argument argument. (FB_CARRAY.) FBETYPE : Tmax type. FBEBADFLD :. fdlc utility fberror FBEBADFLD setting. #include demo_fdl.h int tolen, totype, fromtype, fromlen; long vall; FBUF *fbuf; char *ptr; 113

115 if ((fbuf = fballoc(10, 100)) == NULL) { printf( fballoc failed, errno = %d\n, fberror); vall = 1111; fromlen = sizeof(long); fbput(fbuf, TOTMON,(char *)&vall, 0); ptr = fbtypecvt(&tolen, FB_STRING, (char *)&vall, FB_LONG, fromlen); printf( Converted string = %s\n, ptr); /* output Converted string = 1111 */... fbget_fldname(), fbget_fldno(), fbget_fldtype(), fbget_strfldtype() 114

Tmax

Tmax Tmax FDL Reference Manual Copyright 2000 TmaxSoft Co., Ltd. All Rights Reserved Copyright Notice Copyright 2000 TmaxSoft Co., Ltd. All Rights Reserved. TmaxSoft Co., Ltd. 대한민국서울시강남구대치동 946-1 글라스타워 18 층우

More information

Tmax

Tmax Tmax FDL Reference Guide Tmax v5.0 SP1 Copyright 2009 TmaxSoft Co., Ltd. All Rights Reserved. Copyright Notice Copyright 2009 TmaxSoft Co., Ltd. All Rights Reserved. 대한민국경기도성남시분당구서현동 263 분당스퀘어 (AK 프라자

More information

歯9장.PDF

歯9장.PDF 9 Hello!! C printf() scanf() getchar() putchar() gets() puts() fopen() fclose() fprintf() fscant() fgetc() fputs() fgets() gputs() fread() fwrite() fseek() ftell() I/O 2 (stream) C (text stream) : `/n'

More information

슬라이드 1

슬라이드 1 / 유닉스시스템개요 / 파일 / 프로세스 01 File Descriptor file file descriptor file type unix 에서의파일은단지바이트들의나열임 operating system 은파일에어떤포맷도부과하지않음 파일의내용은바이트단위로주소를줄수있음 file descriptor 는 0 이나양수임 file 은 open 이나 creat 로 file

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

untitled

untitled if( ) ; if( sales > 2000 ) bonus = 200; if( score >= 60 ) printf(".\n"); if( height >= 130 && age >= 10 ) printf(".\n"); if ( temperature < 0 ) printf(".\n"); // printf(" %.\n \n", temperature); // if(

More information

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

13주-14주proc.PDF

13주-14주proc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

More information

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

chap7.key

chap7.key 1 7 C 2 7.1 C (System Calls) Unix UNIX man Section 2 C. C (Library Functions) C 1975 Dennis Ritchie ANSI C Standard Library 3 (system call). 4 C?... 5 C (text file), C. (binary file). 6 C 1. : fopen( )

More information

C++-¿Ïº®Çؼ³10Àå

C++-¿Ïº®Çؼ³10Àå C C++. (preprocessor directives), C C++ C/C++... C++, C. C++ C. C C++. C,, C++, C++., C++.,.. #define #elif #else #error #if #itdef #ifndef #include #line #pragma #undef #.,.,. #include #include

More information

03장.스택.key

03장.스택.key ---------------- DATA STRUCTURES USING C ---------------- 03CHAPTER 1 ? (stack): (LIFO:Last-In First-Out) 2 : top : ( index -1 ),,, 3 : ( ) ( ) -> ->. ->.... 4 Stack ADT : (LIFO) : init():. is_empty():

More information

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾

À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾ P a 02 r t Chapter 4 TCP Chapter 5 Chapter 6 UDP Chapter 7 Chapter 8 GUI C h a p t e r 04 TCP 1 3 1 2 3 TCP TCP TCP [ 4 2] listen connect send accept recv send recv [ 4 1] PC Internet Explorer HTTP HTTP

More information

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - (Asynchronous Mode) - - - ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - UART (Univ ers al As y nchronous Receiver / T rans mitter) 8250A 8250A { COM1(3F8H). - Line Control Register

More information

untitled

untitled Push... 2 Push... 4 Push... 5 Push... 13 Push... 15 1 FORCS Co., LTD A Leader of Enterprise e-business Solution Push (Daemon ), Push Push Observer. Push., Observer. Session. Thread Thread. Observer ID.

More information

61 62 63 64 234 235 p r i n t f ( % 5 d :, i+1); g e t s ( s t u d e n t _ n a m e [ i ] ) ; if (student_name[i][0] == \ 0 ) i = MAX; p r i n t f (\ n :\ n ); 6 1 for (i = 0; student_name[i][0]!= \ 0&&

More information

5.스택(강의자료).key

5.스택(강의자료).key CHP 5: https://www.youtube.com/watch?v=ns-r91557ds ? (stack): (LIFO:Last-In First-Out):. D C B C B C B C B (element) C (top) B (bottom) (DT) : n element : create() ::=. is_empty(s) ::=. is_full(s) ::=.

More information

T100MD+

T100MD+ User s Manual 100% ) ( x b a a + 1 RX+ TX+ DTR GND TX+ RX+ DTR GND RX+ TX+ DTR GND DSR RX+ TX+ DTR GND DSR [ DCE TYPE ] [ DCE TYPE ] RS232 Format Baud 1 T100MD+

More information

C 프로그래밍 언어 입문 C 프로그래밍 언어 입문 김명호저 숭실대학교 출판국 머리말..... C, C++, Java, Fortran, Python, Ruby,.. C. C 1972. 40 C.. C. 1999 C99. C99. C. C. C., kmh ssu.ac.kr.. ,. 2013 12 Contents 1장 프로그래밍 시작 1.1 C 10 1.2 12

More information

untitled

untitled while do-while for break continue while( ) ; #include 0 i int main(void) int meter; int i = 0; while(i < 3) meter = i * 1609; printf("%d %d \n", i, meter); i++; return 0; i i< 3 () 0 (1)

More information

Chap7.PDF

Chap7.PDF Chapter 7 The SUN Intranet Data Warehouse: Architecture and Tools All rights reserved 1 Intranet Data Warehouse : Distributed Networking Computing Peer-to-peer Peer-to-peer:,. C/S Microsoft ActiveX DCOM(Distributed

More information

Solaris Express Developer Edition

Solaris Express Developer Edition Solaris Express Developer Edition : 2008 1 Solaris TM Express Developer Edition Solaris OS. Sun / Solaris, Java, Web 2.0,,. Developer Solaris Express Developer Edition System Requirements. 768MB. SPARC

More information

chap8.PDF

chap8.PDF 8 Hello!! C 2 3 4 struct - {...... }; struct jum{ int x_axis; int y_axis; }; struct - {...... } - ; struct jum{ int x_axis; int y_axis; }point1, *point2; 5 struct {....... } - ; struct{ int x_axis; int

More information

bn2019_2

bn2019_2 arp -a Packet Logging/Editing Decode Buffer Capture Driver Logging: permanent storage of packets for offline analysis Decode: packets must be decoded to human readable form. Buffer: packets must temporarily

More information

chap10.PDF

chap10.PDF 10 C++ Hello!! C C C++ C++ C++ 2 C++ 1980 Bell Bjarne Stroustrup C++ C C++ C, C++ C C 3 C C++ (prototype) (type checking) C C++ : C++ 4 C C++ (prototype) (type checking) [ 10-1] #include extern

More information

휠세미나3 ver0.4

휠세미나3 ver0.4 andromeda@sparcs:/$ ls -al dev/sda* brw-rw---- 1 root disk 8, 0 2014-06-09 18:43 dev/sda brw-rw---- 1 root disk 8, 1 2014-06-09 18:43 dev/sda1 brw-rw---- 1 root disk 8, 2 2014-06-09 18:43 dev/sda2 andromeda@sparcs:/$

More information

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf("hihi\n"); } warning: conflicting types for functiona

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf(hihi\n); } warning: conflicting types for functiona 이름 : 학번 : A. True or False: 각각항목마다 True 인지 False 인지적으세요. 1. (Python:) randint 함수를사용하려면, random 모듈을 import 해야한다. 2. (Python:) '' (single quote) 는한글자를표현할때, (double quote) 는문자열을표현할때사용한다. B. 다음에러를수정하는방법을적으세요.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

1217 WebTrafMon II

1217 WebTrafMon II (1/28) (2/28) (10 Mbps ) Video, Audio. (3/28) 10 ~ 15 ( : telnet, ftp ),, (4/28) UDP/TCP (5/28) centralized environment packet header information analysis network traffic data, capture presentation network

More information

Microsoft PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100

Microsoft PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100 2015-1 프로그래밍언어 9. 연결형리스트, Stack, Queue 2015 년 5 월 4 일 교수김영탁 영남대학교공과대학정보통신공학과 (Tel : +82-53-810-2497; Fax : +82-53-810-4742 http://antl.yu.ac.kr/; E-mail : ytkim@yu.ac.kr) 연결리스트 (Linked List) 연결리스트연산 Stack

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

Microsoft PowerPoint - chap13-입출력라이브러리.pptx

Microsoft PowerPoint - chap13-입출력라이브러리.pptx #include int main(void) int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; 1 학습목표 스트림의 기본 개념을 알아보고,

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

Deok9_Exploit Technique

Deok9_Exploit Technique Exploit Technique CodeEngn Co-Administrator!!! and Team Sur3x5F Member Nick : Deok9 E-mail : DDeok9@gmail.com HomePage : http://deok9.sur3x5f.org Twitter :@DDeok9 > 1. Shell Code 2. Security

More information

slide2

slide2 Program P ::= CL CommandList CL ::= C C ; CL Command C ::= L = E while E : CL end print L Expression E ::= N ( E + E ) L &L LefthandSide L ::= I *L Variable I ::= Numeral N ::=

More information

SRC PLUS 제어기 MANUAL

SRC PLUS 제어기 MANUAL ,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO

More information

thesis

thesis ( Design and Implementation of a Generalized Management Information Repository Service for Network and System Management ) ssp@nile nile.postech.ac..ac.kr DPE Lab. 1997 12 16 GMIRS GMIRS GMIRS prototype

More information

rmi_박준용_final.PDF

rmi_박준용_final.PDF (RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:

More information

PCServerMgmt7

PCServerMgmt7 Web Windows NT/2000 Server DP&NM Lab 1 Contents 2 Windows NT Service Provider Management Application Web UI 3 . PC,, Client/Server Network 4 (1),,, PC Mainframe PC Backbone Server TCP/IP DCS PLC Network

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 (Host) set up : Linux Backend RS-232, Ethernet, parallel(jtag) Host terminal Target terminal : monitor (Minicom) JTAG Cross compiler Boot loader Pentium Redhat 9.0 Serial port Serial cross cable Ethernet

More information

C# Programming Guide - Types

C# Programming Guide - Types C# Programming Guide - Types 최도경 lifeisforu@wemade.com 이문서는 MSDN 의 Types 를요약하고보충한것입니다. http://msdn.microsoft.com/enus/library/ms173104(v=vs.100).aspx Types, Variables, and Values C# 은 type 에민감한언어이다. 모든

More information

SMB_ICMP_UDP(huichang).PDF

SMB_ICMP_UDP(huichang).PDF SMB(Server Message Block) UDP(User Datagram Protocol) ICMP(Internet Control Message Protocol) SMB (Server Message Block) SMB? : Microsoft IBM, Intel,. Unix NFS. SMB client/server. Client server request

More information

歯7장.PDF

歯7장.PDF 7 Hello!! C 2 . 3 ([] ) < > [ ]; int array[10]; < > [ ][ ]; int array [3] [5]; 4 < > [ ]={ x1,,x10} ( ); (,). ({}). : int array[10]={1,2,3,4,5,6,7,8,9,10}; (" "). : char array[7]="turbo-c"; 5 int array[2][3]={{1,2},{3,4},{5,6}};

More information

chap7.PDF

chap7.PDF 7 Hello!! C 2 . 3 ([] ) < > [ ]; int array[10]; < > [ ][ ]; int array [3] [5]; 4 < > [ ]={ x1,,x10} ( ); (,). ({}). : int array[10]={1,2,3,4,5,6,7,8,9,10}; (" "). : char array[7]="turbo-c"; 5 int array[2][3]={{1,2},{3,4},{5,6}};

More information

07 자바의 다양한 클래스.key

07 자바의 다양한 클래스.key [ 07 ] . java.lang Object, Math, String, StringBuffer Byte, Short, Integer, Long, Float, Double, Boolean, Character. java.util Random, StringTokenizer Calendar, GregorianCalendar, Date. Collection, List,

More information

목차 1. 제품 소개... 4 1.1 특징... 4 1.2 개요... 4 1.3 Function table... 5 2. 기능 소개... 6 2.1 Copy... 6 2.2 Compare... 6 2.3 Copy & Compare... 6 2.4 Erase... 6 2

목차 1. 제품 소개... 4 1.1 특징... 4 1.2 개요... 4 1.3 Function table... 5 2. 기능 소개... 6 2.1 Copy... 6 2.2 Compare... 6 2.3 Copy & Compare... 6 2.4 Erase... 6 2 유영테크닉스( 주) 사용자 설명서 HDD014/034 IDE & SATA Hard Drive Duplicator 유 영 테 크 닉 스 ( 주) (032)670-7880 www.yooyoung-tech.com 목차 1. 제품 소개... 4 1.1 특징... 4 1.2 개요... 4 1.3 Function table... 5 2. 기능 소개... 6 2.1 Copy...

More information

Microsoft PowerPoint - a10.ppt [호환 모드]

Microsoft PowerPoint - a10.ppt [호환 모드] Structure Chapter 10: Structures t and Macros Structure 관련된변수들의그룹으로이루어진자료구조 template, pattern field structure를구성하는변수 (cf) C언어의 struct 프로그램의 structure 접근 entire structure 또는 individual fields Structure는

More information

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070>

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070> #include "stdafx.h" #include "Huffman.h" 1 /* 비트의부분을뽑아내는함수 */ unsigned HF::bits(unsigned x, int k, int j) return (x >> k) & ~(~0

More information

s SINUMERIK 840C Service and User Manual DATA SAVING & LOADING & & /

s SINUMERIK 840C Service and User Manual DATA SAVING & LOADING & & / SINUMERIK 840C Service and Uer Manual DATA SAVING & LOADING & & / / NC, RS232C /. NC NC / Computer link () Device ( )/PC / / Print erial Data input RS232C () Data output Data management FLOPPY DRIVE, FLOPPY

More information

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4 Introduction to software design 2012-1 Final 2012.06.13 16:00-18:00 Student ID: Name: - 1 - 0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x

More information

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074>

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074> Chap #2 펌웨어작성을위한 C 언어 I http://www.smartdisplay.co.kr 강의계획 Chap1. 강의계획및디지털논리이론 Chap2. 펌웨어작성을위한 C 언어 I Chap3. 펌웨어작성을위한 C 언어 II Chap4. AT89S52 메모리구조 Chap5. SD-52 보드구성과코드메모리프로그래밍방법 Chap6. 어드레스디코딩 ( 매핑 ) 과어셈블리어코딩방법

More information

11장 포인터

11장 포인터 Dynamic Memory and Linked List 1 동적할당메모리의개념 프로그램이메모리를할당받는방법 정적 (static) 동적 (dynamic) 정적메모리할당 프로그램이시작되기전에미리정해진크기의메모리를할당받는것 메모리의크기는프로그램이시작하기전에결정 int i, j; int buffer[80]; char name[] = data structure"; 처음에결정된크기보다더큰입력이들어온다면처리하지못함

More information

SIGPLwinterschool2012

SIGPLwinterschool2012 1994 1992 2001 2008 2002 Semantics Engineering with PLT Redex Matthias Felleisen, Robert Bruce Findler and Matthew Flatt 2009 Text David A. Schmidt EXPRESSION E ::= N ( E1 O E2 ) OPERATOR O ::=

More information

1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 #define _CRT_SECURE_NO_WARNINGS #include #include main() { char ch; printf(" 문자 1개를입력하시오 : "); scanf("%c", &ch); if (isalpha(ch))

More information

Microsoft PowerPoint - Chapter_04.pptx

Microsoft PowerPoint - Chapter_04.pptx 프로그래밍 1 1 Chapter 4. Constant and Basic Data Types April, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 이장의강의목표 2 기본자료형문자표현방식과문자자료형상수자료형변환 기본자료형 (1/8) 3 변수 (Variables)

More information

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

BMP 파일 처리

BMP 파일 처리 BMP 파일처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 영상반전프로그램제작 2 Inverting images out = 255 - in 3 /* 이프로그램은 8bit gray-scale 영상을입력으로사용하여반전한후동일포맷의영상으로저장한다. */ #include #include #define WIDTHBYTES(bytes)

More information

OPCTalk for Hitachi Ethernet 1 2. Path. DCOMwindow NT/2000 network server. Winsock update win95. . . 3 Excel CSV. Update Background Thread Client Command Queue Size Client Dynamic Scan Block Block

More information

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt 변수와상수 1 변수란무엇인가? 변수 : 정보 (data) 를저장하는컴퓨터내의특정위치 ( 임시저장공간 ) 메모리, register 메모리주소 101 번지 102 번지 변수의크기에따라 주로 byte 단위 메모리 2 기본적인변수형및변수의크기 변수의크기 해당컴퓨터에서는항상일정 컴퓨터마다다를수있음 short

More information

PowerPoint Presentation

PowerPoint Presentation FORENSICINSIGHT SEMINAR SQLite Recovery zurum herosdfrc@google.co.kr Contents 1. SQLite! 2. SQLite 구조 3. 레코드의삭제 4. 삭제된영역추적 5. 레코드복원기법 forensicinsight.org Page 2 / 22 SQLite! - What is.. - and why? forensicinsight.org

More information

OCaml

OCaml OCaml 2009.. (khheo@ropas.snu.ac.kr) 1 ML 2 ML OCaml INRIA, France SML Bell lab. & Princeton, USA nml SNU/KAIST, KOREA 3 4 (let) (* ex1.ml *) let a = 10 let add x y = x + y (* ex2.ml *) let sumofsquare

More information

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V Mobile Service > IAP > Android SDK IAP SDK TOAST SDK. IAP SDK. Android Studio IDE 2.3.3 Android SDK Version 2.3.3 (API Level 10). Name Reference Version License okhttp http://square.github.io/okhttp/ 1.5.4

More information

int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \

int main(void) int a; int b; a=3; b=a+5; printf(a : %d \n, a); printf(b : %d \n, b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf( a : %x \ ? 1 int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \n", &a); printf(" b : %x \n", &b); * : 12ff60,

More information

untitled

untitled Embedded System Lab. II Embedded System Lab. II 2 RTOS Hard Real-Time vs Soft Real-Time RTOS Real-Time, Real-Time RTOS General purpose system OS H/W RTOS H/W task Hard Real-Time Real-Time System, Hard

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

public key private key Encryption Algorithm Decryption Algorithm 1

public key private key Encryption Algorithm Decryption Algorithm 1 public key private key Encryption Algorithm Decryption Algorithm 1 One-Way Function ( ) A function which is easy to compute in one direction, but difficult to invert - given x, y = f(x) is easy - given

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED Controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

hd1300_k_v1r2_Final_.PDF

hd1300_k_v1r2_Final_.PDF Starter's Kit for HelloDevice 1300 Version 11 1 2 1 2 3 31 32 33 34 35 36 4 41 42 43 5 51 52 6 61 62 Appendix A (cross-over) IP 3 Starter's Kit for HelloDevice 1300 1 HelloDevice 1300 Starter's Kit HelloDevice

More information

untitled

untitled 자료형 기본자료형 : char, int, float, double 등 파생자료형 : 배열, 열거형, 구조체, 공용체 vs struct 구조체 _ 태그 _ 이름 자료형멤버 _ 이름 ; 자료형멤버 _ 이름 ;... ; struct student int number; // char name[10]; // double height; // ; // x값과 y값으로이루어지는화면의좌표

More information

Interstage5 SOAP서비스 설정 가이드

Interstage5 SOAP서비스 설정 가이드 Interstage 5 Application Server ( Solaris ) SOAP Service Internet Sample Test SOAP Server Application SOAP Client Application CORBA/SOAP Server Gateway CORBA/SOAP Gateway Client INTERSTAGE SOAP Service

More information

01-OOPConcepts(2).PDF

01-OOPConcepts(2).PDF Object-Oriented Programming Concepts Tel: 02-824-5768 E-mail: hhcho@selabsoongsilackr? OOP (Object) (Encapsulation) (Message) (Class) (Inheritance) (Polymorphism) (Abstract Class) (Interface) 2 1 + = (Dependency)

More information

기타자료.PDF

기타자료.PDF < > 1 1 2 1 21 1 22 2 221 2 222 3 223 4 3 5 31 5 311 (netting)5 312 (matching) 5 313 (leading) (lagging)6 314 6 32 6 321 7 322 8 323 13 324 19 325 20 326 20 327 20 33 21 331 (ALM)21 332 VaR(Value at Risk)

More information

hlogin7

hlogin7 0x07. Return Oriented Programming ROP? , (DEP, ASLR). ROP (Return Oriented Programming) (excutable memory) rop. plt, got got overwrite RTL RTL Chain DEP, ASLR gadget Basic knowledge plt, got call function

More information

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 비트연산자 1 1 비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 진수법! 2, 10, 16, 8! 2 : 0~1 ( )! 10 : 0~9 ( )! 16 : 0~9, 9 a, b,

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 KeyPad Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착 4x4 Keypad 2 KeyPad 를제어하기위하여 FPGA 내부에 KeyPad controller 가구현 KeyPad controller 16bit 로구성된

More information

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Crash Unity SDK... Log & Crash Search. - Unity3D v4.0 ios

More information

106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float

106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float Part 2 31 32 33 106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float f[size]; /* 10 /* c 10 /* f 20 3 1

More information

컴파일러

컴파일러 YACC 응용예 Desktop Calculator 7/23 Lex 입력 수식문법을위한 lex 입력 : calc.l %{ #include calc.tab.h" %} %% [0-9]+ return(number) [ \t] \n return(0) \+ return('+') \* return('*'). { printf("'%c': illegal character\n",

More information

초보자를 위한 C++

초보자를 위한 C++ C++. 24,,,,, C++ C++.,..,., ( ). /. ( 4 ) ( ).. C++., C++ C++. C++., 24 C++. C? C++ C C, C++ (Stroustrup) C++, C C++. C. C 24.,. C. C+ +?. X C++.. COBOL COBOL COBOL., C++. Java C# C++, C++. C++. Java C#

More information

Javascript.pages

Javascript.pages JQuery jquery part1 JavaScript : e-mail:leseraphina@naver.com http://www.webhard.co.kr I.? 2 ......,,. : : html5 ; ; .

More information

기초컴퓨터프로그래밍

기초컴퓨터프로그래밍 구조체 #include int main() { } printf("structure\n"); printf("instructor: Keon Myung Lee\n"); return 0; 내용 구조체 (struct) Typedef 공용체 (union) 열거형 (enum) 구조체 구조체 (structure) 어떤대상을표현하는서로연관된항목 ( 변수 )

More information

중간고사

중간고사 중간고사 예제 1 사용자로부터받은두개의숫자 x, y 중에서큰수를찾는알고리즘을의사코드로작성하시오. Step 1: Input x, y Step 2: if (x > y) then MAX

More information

이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다. 2

이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다. 2 제 17 장동적메모리와연결리스트 유준범 (JUNBEOM YOO) Ver. 2.0 jbyoo@konkuk.ac.kr http://dslab.konkuk.ac.kr 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다. 이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다.

More information

Chapter 4. LISTS

Chapter 4. LISTS 6. 동치관계 (Equivalence Relations) 동치관계 reflexive, symmetric, transitive 성질을만족 "equal to"(=) 관계는동치관계임. x = x x = y 이면 y = x x = y 이고 y = z 이면 x = z 동치관계를이용하여집합 S 를 동치클래스 로분할 동일한클래스내의원소 x, y 에대해서는 x y 관계성립

More information

ETL_project_best_practice1.ppt

ETL_project_best_practice1.ppt ETL ETL Data,., Data Warehouse DataData Warehouse ETL tool/system: ETL, ETL Process Data Warehouse Platform Database, Access Method Data Source Data Operational Data Near Real-Time Data Modeling Refresh/Replication

More information

<4D F736F F F696E74202D20C1A63132B0AD20B5BFC0FB20B8DEB8F0B8AEC7D2B4E7>

<4D F736F F F696E74202D20C1A63132B0AD20B5BFC0FB20B8DEB8F0B8AEC7D2B4E7> 제14장 동적 메모리 할당 Dynamic Allocation void * malloc(sizeof(char)*256) void * calloc(sizeof(char), 256) void * realloc(void *, size_t); Self-Referece NODE struct selfref { int n; struct selfref *next; }; Linked

More information

제 14 장포인터활용 유준범 (JUNBEOM YOO) Ver 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다.

제 14 장포인터활용 유준범 (JUNBEOM YOO) Ver 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다. 제 14 장포인터활용 유준범 (JUNBEOM YOO) Ver. 2.0 jbyoo@konkuk.ac.kr http://dslab.konkuk.ac.kr 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다. 이번장에서학습할내용 이중포인터란무엇인가? 포인터배열 함수포인터 다차원배열과포인터 void 포인터 포인터는다양한용도로유용하게활용될수있습니다. 2 이중포인터

More information

Infinity(∞) Strategy

Infinity(∞) Strategy 반복제어 표월성 passwd74@cherub.sungkyul.edu 개요 for() 문 break문과 continue문 while문 do-while문 for() 문 for() 문형식 for( 표현식1; 표현식2; 표현식3) 여러문장들 ; 표현식 1 : 초기화 (1 번만수행 ) 표현식 2 : 반복문수행조건 ( 없으면무한반복 ) 표현식 3 : 반복문수행횟수 for()

More information

10.

10. 10. 10.1 10.2 Library Routine: void perror (char* str) perror( ) str Error 0 10.3 10.3 int fd; /* */ fd = open (filename, ) /*, */ if (fd = = -1) { /* */ } fcnt1 (fd, ); /* */ read (fd, ); /* */ write

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Network Programming Jo, Heeseung Network 실습 네트워크프로그래밍 멀리떨어져있는호스트들이서로데이터를주고받을수있도록프로그램을구현하는것 파일과는달리데이터를주고받을대상이멀리떨어져있기때문에소프트웨어차원에서호스트들간에연결을해주는장치가필요 이러한기능을해주는장치로소켓이라는인터페이스를많이사용 소켓프로그래밍이란용어와네트워크프로그래밍이랑용어가같은의미로사용

More information

DocsPin_Korean.pages

DocsPin_Korean.pages Unity Localize Script Service, Page 1 Unity Localize Script Service Introduction Application Game. Unity. Google Drive Unity.. Application Game. -? ( ) -? -?.. 준비사항 Google Drive. Google Drive.,.. - Google

More information

http://cafedaumnet/pway Chapter 1 Chapter 2 21 printf("this is my first program\n"); printf("\n"); printf("-------------------------\n"); printf("this is my second program\n"); printf("-------------------------\n");

More information

Microsoft Word - Network Programming_NewVersion_01_.docx

Microsoft Word - Network Programming_NewVersion_01_.docx 10. Unix Domain Socket 105/113 10. Unix Domain Socket 본절에서는 Unix Domain Socket(UDS) 에대한개념과이에대한실습을수행하고, 이와동시에비신뢰적인통신시스템의문제점에대해서분석하도록한다. 이번실습의목표는다음과같다. 1. Unix Domain Socket의사용법을익히고, IPC에대해서실습 2. TCP/IP의응용계층과전달계층의동작을구현및실습

More information

Microsoft PowerPoint - 알고리즘_4주차_1차시.pptx

Microsoft PowerPoint - 알고리즘_4주차_1차시.pptx Chapter 4 Fundamental File Structure Concepts Reference: M. J. Folk and B. Zoellick, File Structures, Addison-Wesley (1992). TABLE OF CONTENTSN Field and Record Organization Record Access More about Record

More information

Remote UI Guide

Remote UI Guide Remote UI KOR Remote UI Remote UI PDF Adobe Reader/Adobe Acrobat Reader. Adobe Reader/Adobe Acrobat Reader Adobe Systems Incorporated.. Canon. Remote UI GIF Adobe Systems Incorporated Photoshop. ..........................................................

More information

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O Orange for ORACLE V4.0 Installation Guide ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE...1 1....2 1.1...2 1.2...2 1.2.1...2 1.2.2 (Online Upgrade)...11 1.3 ORANGE CONFIGURATION ADMIN...12 1.3.1 Orange Configuration

More information