Please enable JavaScript to view this site.

A-Shell Reference

//TEXTINDENT,x, y, text

//TEXTINDENT

TEXTINDENT is a variation of TEXTOUT designed for outputting multiple lines of text at a particular indent.

The first form of the directive acts exactly like TEXTOUT except:

it establishes an indent value of x, so that subsequent lines output without using TEXTOUT will retain the same indent.
it sets the internal printer 'cursor' to the specified x,y position so that subsequent lines (output without any explicit positioning) will appear in the expected place.
you can set x and/or y to -1 to refer to the current x and/or y position (useful when you don't know the current position). Note that for the x position, you might need to use the technique of ending the previous output with a backslash ("\") to hold the position, for example:

//TextOut,100,100,Our indented text starts here---> \

//TextIndent,-1,100,[Start Indented Text]

[2nd line of indented text]

//TextIndent

The second form (without any arguments) disables the indent, restoring the original margin.

This directive is useful when outputting a multiline block of text, such as you would get from INFLD multiline mode or INMEMO. For example, assuming that we have retrieved the multiline text into a variable MEMO$, you might use the following code:

PRINT #CH, "//TEXTINDENT,";XPOS;",";YPOS;",";MEMO$

PRINT #CH, "//TEXTINDENT"       ! turn indent off

Note that because the MEMO$ variable contains embedded CRLF terminators, in the printfile it would look something like the this:

//TEXTINDENT,150,300,This is the first line of the memo

This is the second line of the memo

This is the third line of the memo

//TEXTINDENT

Also note that the vertical spacing for the subsequent lines (second and third lines in the example immediately above) is determined based on the last established font, and is the same as what you would get when outputting text without using TEXTOUT.

Although in general it is necessary to quote arguments that contain embedded commas, neither TEXTINDENT nor TEXTOUT require it. This is particularly useful when outputting a multi-line string directly from some data source like INMEMO or a multi-line INFLD.