Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Left aligns a string within a string variable, or copies a variable of one user-defined type to another variable of a different user-defined type.
Syntax
LSetstringvar**=**string
LSetvarname1**=**varname2
The LSet statement syntax has these parts:
| Part | Description |
| stringvar | Required. Name of string variable. |
| string | Required. String expression to be left-aligned within stringvar. |
| varname1 | Required. Variable name of the user-defined type being copied to. |
| varname2 | Required. Variable name of the user-defined type being copied from. |
Remarks
LSet replaces any leftover characters in stringvar with spaces.
If string is longer than stringvar, LSet places only the leftmost characters, up to the length of the stringvar, in stringvar.
Warning Using LSet to copy a variable of one user-defined type into a variable of a different user-defined type is not recommended. Copying data of one data type into space reserved for a different data type can cause unpredictable results.
When you copy a variable from one user-defined type to another, the binary data from one variable is copied into the memory space of the other, without regard for the data types specified for the elements.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in