Lingo Dictionary > A-C > char...of |
![]() ![]() ![]() |
char...of
Syntax
textMemberExpression
.char[
whichCharacter]
char
whichCharacter
of
fieldOrStringVariable
textMemberExpression
.char[
firstCharacter..lastCharacter]
char
firstCharacter
to
lastCharacter
of
fieldOrStringVariable
Description
Keyword; identifies a character or a range of characters in a chunk expression. A chunk expression is any character, word, item, or line in any source of text (such as field cast members and variables) that holds a string.
![]() |
An expression using |
![]() |
An expression using |
The expressions must be integers that specify a character or range of characters in the chunk. Characters include letters, numbers, punctuation marks, spaces, and control characters such as Tab and Return.
You can test but not set the char...of
keyword. Use the put...into
command to modify the characters in a string.
Example
This statement displays the first character of the string $9.00:
put ("$9.00").char[1..1] -- "$"
Example
This statement displays the entire string $9.00:
put ("$9.00").char[1..5] -- "$9.00"
Example
This statement changes the first five characters of the second word in the third line of a text cast member:
member("quiz").line[3].word[2].char[1..5] = "?????"
See also
mouseMember
, mouseItem
, mouseLine
, mouseWord
![]() ![]() ![]() |