Text:

Command group Flag affected Reversible Execute on client Platform(s)
Text NO NO YES All

Syntax

Text: {text} ([Carriage return][,Linefeed][,Platform newline])

Options
Carriage return If specified, the command appends a carriage return, after it appends the text
Linefeed If specified, the command appends a line feed, after it appends the text
Platform newline If specified, the command appends the newline character sequence for the currently executing platform after it appends the text

Description

This command adds text to the text buffer for the current method stack: note the Method Editor will enclose the complete text in curly brackets automatically, so these do not need to be entered.

The Text: command supports leading and trailing spaces and can contain square bracket notation, that is, you can include or add the contents of a variable to the text buffer. You build up the text block using the Begin text block and one or more Text: commands. A text editor will pop up when you enter or edit a Text: line.

The Carriage return, Linefeed, and Platform newline options add the appropriate character(s) to the end of the current Text: line. When you have placed one Text: line and you press Ctrl/Cmnd-N to create a new method line, the Text: command is selected and the current carriage return and line feed options are copied to the new method line automatically. You should end a block of text with the End text block command, and you can return the contents of the text buffer using the Get text block command.

You cannot insert an inline comment on any lines in a Text: code block.

You cannot insert "Text:(" because the Text: command can have options (unlike Line:). For the Text: command, when you type ( at the end of the code editor line, Omnis treats this as the start of the options, and the code assistant can then pop up the possible options. As soon as you type another character after the (, Omnis treats this as text comprising ( followed by the character. This restriction is the best compromise that allows the code assistant to present the possible options, and allows text starting with ( to be entered. As a workaround, you can enter ["("] if you want to add an open parenthesis to the text.