|
Re: Find command ?
|
sixs
|
Jan 04, 2005 17:24 PST
|
Thanks for the help
Jim
Christian Cuvier wrote:
| | Post is OT somehow. But fix is easy.
Jim Smiley a écrit :
| | Hello,
I am trying to use the command "find" the values in this value
located the edb database.
command cl = find("C",hSle9) finds cl = 0, If Ichange the "C" to 'C' it
finds the C. cl = 1
when I try to find the colan ":" in the value
c2 = find("C:",hSle) c2 is = 0
Thanks for any help
|
Use
c2 = match("C:",hSle)
instead.
If some element of hSle was {'C',':'}, find() would get it. But "C:" is not an
element, but a substring of the contents of hSle. Only match() can locate
substrings (subsequences actually).
HTH
CChris
| | jvandal
"C:\\EUPHORIA\\INCLUDE\\EUSQL\\Mycars\\32FordCoup.bmp"
hSle9 =(sql[2][x][10])
if x = 1 then
--hSle1 = hid1
setText(Sle1, hSle1)
setText(Sle2, hSle2)
setText(Sle3, hSle3) setText(Sle4, hSle4)
setText(Sle5, hSle5) setText(Sle6, hSle6)
setText(Sle7, hSle7) setText(Sle8, hSle8)
trace(1)
hSle9 = hSle9
ll =length(hSle9)
cl = find("C:",hSle9)
c2 = find("C:",hSle9[cl+3..ll])
trace(1)
cl = cl
if compare(cl, 0) > 0 then
hSle9 = hSle9[cl..c2-2]
end if
hSle9 = hSle9
setText(Sle9, hSle9)
|
|
|
|
 |
|