LSET

From QB64 Wiki
Revision as of 00:39, 7 October 2009 by 90.231.62.232 (talk) (Created page with 'LSET left-justifies a stringexpression so that it fits in a stringvariable. ''Syntax:'' LSET {stringvariable=stringexpression | stringexpression1=stringexpression2} If the s…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

LSET left-justifies a stringexpression so that it fits in a stringvariable.


Syntax: LSET {stringvariable=stringexpression | stringexpression1=stringexpression2}


If the stringvariable requires less bytes than were defined for the stringexpression in the FIELD statement then the stringexpression is left-justified.


LSET is used to assign a expression to a variable of a different type than the expression.


Example:

CLS


TYPE ninestring
head AS STRING * 9
END TYPE


TYPE fivestring
head AS STRING * 5
END TYPE


DIM me AS ninestring, you AS fivestring


me.head = "ACHES NOT"


LSET you.head = me.head
PRINT "me.head: "; me.head
PRINT "you.head: "; you.head


Returns:

me.head: ACHES NOT
you.head: ACHES



See also: RSET, RTRIM$


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage