Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
print [2026/07/08 17:28]
chrystian [Optional Inputs] Fix port description
print [2026/08/20 02:02] (current)
hermann
Line 1: Line 1:
-====== Print ====== ​+====== Print ======
  
 ===== Description ===== ===== Description =====
  
-This container prints messages to the application console. +''​Print''​ is a container ​functor that prints messages to the application console ​around the execution of the functors it contains: an optional message before running its content, and an optional message after. It causes side effects (writing to the log/​console) and otherwise simply runs its contained functors like any other container.
- +
-===== Inputs =====+
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
-^ Name ^ Type ^ Description ​^ Default Value +^ Name ^ Type ^ Description ^ 
-| Initial Message ​ | [[String Type|String]]  | Message printed before ​the execution of the container content. ​ | None  ​+| Initial Message | [[string_type|String Type]] | Message printed before the container'​s ​content ​is executed. Nullable; the default value is none (nothing is printed). | 
-| Final Message ​ | [[String Type|String]]  | Message printed after the execution of the container content. ​ | None  ​+| Final Message | [[string_type|String Type]] | Message printed after the container'​s ​content ​is executed. Nullable; the default value is none (nothing is printed). | 
-| Log Level  | [[Log Tag Type|Log Tag]]  Message ​log level. ​ ​| ​Unconditional ​ |+| Log Level | [[log_tag_type|Log Tag Type]] | The log level used to print both messages — for example, distinguishing a normal progress message from an error messageThe default value is Unconditional|
  
 ===== Outputs ===== ===== Outputs =====
 +
 +This functor has no output ports; it acts through the side effect of printing to the console.
  
 ===== Group ===== ===== Group =====
  
-[[Functor List#Control|Control]]+[[functor_list#control|Control]]
  
 ===== Notes ===== ===== Notes =====
  
-To print information about the execution of a given functor or group of functors, ​put these functors ​inside ​the Print functorIt is not advised to use a Print functor ​without any contained functors ​because the execution ​order of this functor will be unspecified.+==== Execution order ==== 
 + 
 +The initial message, if defined, is printed before ​the contained ​functors ​run; the final messageif defined, is printed only after all contained ​functors ​have finished running. Both messages are printed using the same ''​logLevel''​. 
 + 
 +==== Recommended usage ==== 
 + 
 +Using ''​Print'' ​without any contained functors ​is not advised — with nothing inside to order its execution against, when the message is actually printed relative to the rest of the model becomes ​unspecified.
  
-All messages are printed to the application console using the given log level.+==== String formatting ====
  
-This functor offers ​no [[String Type|String]] ​formatting capabilities, ​but it is possible to create formatted and complex messages using the [[Create String]] ​functor. [[string_type#​automatic_conversions|Some ​types]] can also be automatically converted to [[String ​Type|String]]. +''​Print''​ has no string-formatting capabilities ​of its own. To build a formatted or composite message (embedding a computed value, for example)assemble ​the string first with [[create_string|Create String]] ​and connect its result into Initial Message or Final Message; some types are also automatically converted to String ​when connected directly.
-===== Internal Name ===== +
  
-Print+===== Internal Name =====
  
 +''​Print''​