
-- cift10.occ -- CIF test 10, occam bits

#INCLUDE "cif.module"
#INCLUDE "course.module"

CHAN TYPE LINK
  MOBILE RECORD
    CHAN INT in?:
    CHAN INT out!:
:

#PRAGMA EXTERNAL "PROC CIF.my.process (CHAN LINK! out!) = 1024"

PROC link.client (CHAN LINK! in?, CHAN BYTE out!)
  LINK! cli:
  SEQ
    in ? cli

    SEQ i = 0 FOR 5
      INT v:
      SEQ
        cli[in] ! i
        cli[out] ? v

        out.string ("occam got back ", 0, out!)
        out.int (v, 0, out!)
        out.string ("*n", 0, out!)
:


PROC cift10 (CHAN BYTE kyb?, scr!)
  CHAN LINK! c:
  PAR
    CIF.my.process (c!)
    --{{{  client process
    link.client (c?, scr!)
    --}}}
:

