Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall S_DETAB(string, [length][, expand_length])
The alpha text whose tabs will be expanded. (a)
(optional) The length of the string to be expanded. (n)
(optional) The variable that will be loaded with the length of the expanded string. (n)
The S_DETAB subroutine expands tabs “in place.” Tab stops are set to 8.
If you specify length, the specified number of characters in string will have embedded tabs expanded. If length is not present, or if it has a value of zero, the string to expand is the contents of string with trailing blanks stripped.
If string isn’t long enough to expand all of the tabs, string is not changed. If length and/or expand_length are passed, they are returned with a value of zero on an overflow.
Synergy DBL assumes that no more than 80 tabs will be expanded.
.define TTCHN ,1 record line ,a80 length ,d2, 15 explen ,d2
proc open(TTCHN, o, "tt:") reads(TTCHN, line) xcall s_detab(line, length, explen) if (explen) then writes(TTCHN, line(1,explen)) else writes(TTCHN, "An overflow has occurred!") close TTCHN stop
If the string input looks like this:
and the first tab is three characters in length and the second tab is five characters in length, the resulting string is as follows:
DOE, JOHN ,27