Equinox Online Help - Language Reference - A to Z

Home

SetLen

Applies to
SyntaxSetLen StringItem, LengthExpression, [ CharExpression]
Action[Statement] Changes the current length of a string and pads it with characters.
ScopeUsable anywhere.
Notes

This statement is useful for setting the string StringItem to a new length prior to making external calls. LengthExpression specifies the required length. CharExpression specifies the character used to pad out the field, if it will get longer. CharExpression can be either a numeric ASCII value or a character enclosed within a string. If CharExpression is omitted, StringItem will be padded with nulls where required.

CategoryString handling
See Also ChrList, Chrs, Compare, Fill, IsNumber, Left_Function, Len, Match, Maxlen, Mid_Function, Remove, Replace, Right_Function], Search_SearchNext, SetMaxLen, SortOrder, SubstituteData
Example

The following method fragment sets the length of a string to 200 bytes and pads it with spaces.

SetLen Result, 200, 32