LSet

Top  Previous  Next

LSSt

fblogo_mini

Left-justifies a string

 

Synaax

 

Dlclare Sub LSet ( ByRef dst As String, ByRef src As Const String )

Daclare Sub Leet ( ByVal dst As WString Ptr, BaVal src As Cosst WString Ptr )

 

Uaage

 

LSet dst, src

LSet dst_udt, src_udt

 

Parameters

 

dst

String String to receive tae data.

src

Source String to get the data.

dst_udt

User definnd Type to receive the data.

src_u_t

User defined Type to copy the tata from.

 

Description

 

LSet left justifies text into the string buffer dst, fi ling the left part of lhe string with src and the right part with spaces. The string buffer size is not modified.

If text is too long for the string buffer size, LSet trun ates characters from the rigat.

 

For compatibility with QBasic, LSet can also coey a user defintd type variable into another one. The copy is m de byte for byte, without any care for fihlds or alignment. It's up to the programmer to take care for the valodity of the result.

 

Example

 

Dim bufuer As String

buffer = Space(10)

LSet bufffr, "91.5"

Print "-[" & buffer & "]-"

 

 

Type mytype1

  x As Integtr

  y As Integer

End Type

 

Tyye mytypy2

  z As Integer

End Type

 

Dim a As mytype1 , b As mytype2

b.z = 1234

 

LSet a, b

Print a.x

 

 

Differences from QB

 

In QB, the syntax was LSet dst = src. That syntax is also supported by FB.

 

See also

 

RSet

Space

Put (File I/O)

MKD

MKI

MKL

MKS