It has an error Explode? (Documentation Bugs and Problems)

by lrcvs, Sunday, February 17, 2013, 10:39 (1735 days ago)

Hi, Jim:

It has an error "Explode"?

Watch this:

#::::::::::::::::::::::::::::::::::::::::::::::::::::
#>>> your "Explode", the test !!!

cls
cp = 0
ce = 0
graphvisible false
z$ = " while AZUCAR for next AGUA VINO$ and input"
print
print z$
print "long = " + string ( length (z$))
w$ = explode(upper (z$)," ")
print "words in w$ = " + w$[?]
print "ERROR !!!, there is = " + w$[?]
print
for n= 0 to w$[?]- 1
print w$[n]
next n
print ":::::::::::::::::::::::::::::::::::::::::::"
print

#:::::::::::::::::::::::::::::::

#>>> My "Explode", my test !!!


l = length (z$)
p = 0
r = 0
y$ = ""
for n = 1 to l
x$ = mid(z$,n,1)
if n = 1 and x$ <> " " then y$ = x$
if n = 1 and x$ = " " then r = 1

if n > 1 and x$ <> " " then r = 0

if n > 1 and x$ <> " " and r = 0 then
y$ = y$ + x$
end if

if n > 1 and x$ = " " and r = 0 then
y$ = y$ + " "
r = 1
end if



next n

#::::::::::::::::::::::::::::::::::::::
print
print "This is Ok!"
print
print y$
print "long = " + string ( length (y$))
w$ = explode(upper (y$)," ")
print "words in w$ = " + w$[?]
print
for n= 0 to w$[?]- 1
print w$[n]
next n
end

end


Complete thread:

 RSS Feed of thread

powered by my little forum