Hi,
Does the TLex object handle things like embedded strings? E.g. with the proper delimiters/tokens/ids, can it understand the 5 terminals from
cWelcomeMessage := "Hi, Welcome to Fivewin, friend!"
as
cWelcomeMessage
:=
"Hi"
"Welcome to Fivewin"
"friend!"
or
?? 5, "six", "seven and eight"
as
??
5
"six"
"seven and eight"
? Can it do that?
Tlex - does it handle embedded strings?
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Tlex - does it handle embedded strings?
You can easily get the string this way:
hb_tokenGet( 'cWelcomeMessage := "Hi, Welcome to Fivewin, friend!"', 2, '"' ) // ' " '
hb_tokenGet( 'cWelcomeMessage := "Hi, Welcome to Fivewin, friend!"', 2, '"' ) // ' " '
-
- Posts: 83
- Joined: Fri Aug 09, 2013 12:43 am
Re: Tlex - does it handle embedded strings?
So we embed everything, including the double-quoted string, in single quotes. Ok, sounds good, thanks Antonio.
-
- Posts: 83
- Joined: Fri Aug 09, 2013 12:43 am
Re: Tlex - does it handle embedded strings?
Oops, I made a mistake, in posting this as the desired result:
cWelcomeMessage
:=
"Hi"
"Welcome to Fivewin"
"friend!"
Should be
cWelcomeMessage
:=
"Hi"
"Welcome to Fivewin, friend!"
, and
aTokens := hb_ATokens( sParseString, " ", .T. )
does indeed produce this. Similar behavior for the function that you mentioned, Antonio. Thanks!
cWelcomeMessage
:=
"Hi"
"Welcome to Fivewin"
"friend!"
Should be
cWelcomeMessage
:=
"Hi"
"Welcome to Fivewin, friend!"
, and
aTokens := hb_ATokens( sParseString, " ", .T. )
does indeed produce this. Similar behavior for the function that you mentioned, Antonio. Thanks!