Mercurial > hg > Papers > 2011 > nobu-prosym
comparison presen/index.html @ 57:ce844f6c504d
modify __rectype
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 25 Dec 2011 04:28:23 +0900 |
parents | 06ce8fb8e278 |
children | 97457764428f |
comparison
equal
deleted
inserted
replaced
56:46cc88d1051c | 57:ce844f6c504d |
---|---|
265 <li></li> | 265 <li></li> |
266 </div> | 266 </div> |
267 <!-- PAGE --> | 267 <!-- PAGE --> |
268 <div class="slide"> | 268 <div class="slide"> |
269 <h1></h1> | 269 <h1></h1> |
270 <li></li> | 270 <pre> |
271 typedef struct node { | |
272 selftype *right; | |
273 selftype *left; | |
274 }*NODE | |
275 </pre> | |
276 | |
277 <li></li> | |
278 | |
271 </div> | 279 </div> |
272 <!-- PAGE --> | 280 <!-- PAGE --> |
273 <div class="slide"> | 281 <div class="slide"> |
274 <h1>環境付き継続とは</h1> | 282 <h1>環境付き継続とは</h1> |
275 <li>コードセグメントを呼び出した C の関数に戻る機能</li> | 283 <li>コードセグメントを呼び出した C の関数に戻る機能</li> |
323 </ul> | 331 </ul> |
324 <li class="incremental">setjmp での実装はあまり実用的ではない。</li> | 332 <li class="incremental">setjmp での実装はあまり実用的ではない。</li> |
325 </div> | 333 </div> |
326 <!-- PAGE --> | 334 <!-- PAGE --> |
327 <div class="slide"> | 335 <div class="slide"> |
328 <h1></h1> | 336 <h1>__rectype の実装</h1> |
329 <li></li> | 337 <li>通常、関数の引数に関数ポインタを渡した際は以下の様に使われる。</li> |
330 </div> | 338 <small> |
331 <!-- PAGE --> | 339 <pre> |
332 <div class="slide"> | 340 void factorial(int n, int result, void(*print)()){ |
333 <h1></h1> | 341 : |
334 <li></li> | 342 (*print)(n,result,print,exit1, envp); |
335 </div> | 343 } |
336 <!-- PAGE --> | 344 </pre> |
337 <div class="slide"> | 345 </small> |
338 <h1></h1> | 346 <li>以下の様に扱えるようにしたい。</li> |
339 <li></li> | 347 <small> |
348 <pre> | |
349 void factorial(int n, int result, void *print){ | |
350 : | |
351 (*print)(n,result,print,exit1, envp); | |
352 } | |
353 </pre> | |
354 </small> | |
355 </div> | |
356 <!-- PAGE --> | |
357 <div class="slide"> | |
358 <h1>__rectype の実装</h1> | |
359 <li>そこで、__rectype という予約後を作り、以下の宣言を行えるようにした。</li> | |
360 <pre> | |
361 __code factorial(int n, int result, __rectype *print) { | |
362 : | |
363 (*print)(n,result,print,exit1, envp); | |
364 } | |
365 </pre> | |
340 </div> | 366 </div> |
341 <!-- PAGE --> | 367 <!-- PAGE --> |
342 <div class="slide"> | 368 <div class="slide"> |
343 <h1></h1> | 369 <h1></h1> |
344 <li></li> | 370 <li></li> |