Back to table

Show me my bed

The following is valid µOCCAM. All occam variables and channels are local to the process that immediately follows their declaration. When a process ends, the variables are out of scope. If inside the scope of a variable, another variable is declared with the same name, then within this second variable's scope this namesake replaces the original. The original variable is said to have had a 'hole' knocked in its scope...

Program file: /public/cs3/web/ipptests-phase-1/showmemybed.accept
INT showme, mybed: -- declare two integer variables 
  showme := 500(INT)
  REAL64 showme: -- the real variable showme has knocked a hole
  SEQ            -- in the scope of the integer variable showme
    showme := 3.14(REAL64)