Skip to content

Instantly share code, notes, and snippets.

@robstewart57
Last active August 29, 2015 13:57
Show Gist options
  • Save robstewart57/9550817 to your computer and use it in GitHub Desktop.
Save robstewart57/9550817 to your computer and use it in GitHub Desktop.
Example CAL image receiving actor
actor image_receiver() int(size=9) IMAGE_IN ==> String ACK_OUT :
procedure showImage (List(type:int(size=9),size=9) img)
begin
println(img[0] + img[1] + img[2] + "\n" +
img[3] + img[4] + img[5] + "\n" +
img[6] + img[7] + img[8]
);
end
action IMAGE_IN:[image] repeat 9 ==> ACK_OUT:[str]
var String str
do
showImage(image);
str := "thanks for the image";
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment