--- layout: default title: "Interacting" parent: Normal ancestor: Funcons-beta --- [Funcons-beta] : [Interacting.cbs] ----------------------------- ### Interacting #### Output
[
  Entity standard-out
  Funcon print
]
Entity
  _ -- standard-out!(_:values*) -> _
This entity represents the sequence of values output by a particular transition, where the empty sequence ( ) represents the lack of output. Composition of transitions concatenates their output sequences.
Funcon
  print(_:values*) : =>null-type
print(X*) evaluates the arguments X* and emits the resulting sequence of values on the standard-out channel. print( ) has no effect.
Rule
  print(V*:values*) -- standard-out!(V*) -> null-value
#### Input
[
  Entity standard-in
  Funcon read
]
Entity
  _ -- standard-in?(_:values*) -> _
This entity represents the sequence of values input by a particular transition, where the empty sequence ( ) represents that no values are input. The value null-value represents the end of the input. Composition of transitions concatenates their input sequences, except that when the first sequence ends with null-value, the second seqeunce has to be just null-value.
Funcon
  read : =>values
read inputs a single value from the standard-in channel, and returns it. If the end of the input has been reached, read fails.
Rule
  read -- standard-in?(V:~null-type) -> V
Rule
  read -- standard-in?(null-value) -> fail
____ From the [PLanCompS Project] | [CBS-beta issues...] | [Suggest an improvement...] [Interacting.cbs]: Interacting.cbs "CBS SOURCE FILE" [Funcons-beta]: /CBS-beta/docs/Funcons-beta "FUNCONS-BETA" [Unstable-Funcons-beta]: /CBS-beta/docs/Unstable-Funcons-beta "UNSTABLE-FUNCONS-BETA" [Languages-beta]: /CBS-beta/docs/Languages-beta "LANGUAGES-BETA" [Unstable-Languages-beta]: /CBS-beta/docs/Unstable-Languages-beta "UNSTABLE-LANGUAGES-BETA" [CBS-beta]: /CBS-beta "CBS-BETA" [PLanCompS Project]: https://plancomps.github.io "PROGRAMMING LANGUAGE COMPONENTS AND SPECIFICATIONS PROJECT HOME PAGE" [CBS-beta issues...]: https://github.com/plancomps/CBS-beta/issues "CBS-BETA ISSUE REPORTS ON GITHUB" [Suggest an improvement...]: mailto:plancomps@gmail.com?Subject=CBS-beta%20-%20comment&Body=Re%3A%20CBS-beta%20specification%20at%20Computations/Normal/Interacting/Interacting.cbs%0A%0AComment/Query/Issue/Suggestion%3A%0A%0A%0ASignature%3A%0A "GENERATE AN EMAIL TEMPLATE"