INDENTATION_LEVEL Name
INDENTATION_LEVEL
Purpose
Determine indentation levels of input text.
Category
Calling Sequence
indentation_level, txt0, txt2, lev Inputs
txt0 = Input text array with indented text. in
Keyword Parameters
Keywords
TAB=tb number of spaces per tab (def=8).
Outputs
txt2 = Output trimmed text. out
lev = Returned indentation level of each line. out
Common Blocks
Notes
Notes: The lines in the input text may have various
amounts of indentation (whitespace). The indentation
level array, lev, will give the level for each line,
with 0 for the least amount, 1 for the next amount,
and so on. Make sure the indentation is the same
for each level. It may be a mixture of tabs and
spaces as long as the tab size is given (if not 8).
Here is an example of indented text (txt0):
line 1
line 2
line 2.1
line 2.2
line 3
line 3.1
line 3.2
line 3.2.1
line 3.2.2
line 4
line 5
The lev array would be [0, 0, 1, 1, 0, 1, 1, 2, 2, 0, 0].
Modification History
R. Sterner, 2008 Oct 17
Copyright (C) 2008, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.