Hi to all..
I must say that i hate console but
i am kind a forced to use it for QB translation to o2 code
so why goto ExitDo or just Exit Do not jump from DO/END DO loop ?
or what i am doing wrong :o
DO
ans = INPUT
if lcase(ans) = "y" : goto ExitDo : end if
print ans
END DO
ExitDo:
waitkey
CLS
does really need to be trimmed?
ans = ltrim rtrim(input())
?
Hi Aurel.
O2's input is unprocessed, so it captures the crlf. rtrim removes all trailing white-space.
uses console
string ans
DO
ans = rtrim INPUT
if lcase(ans) = "y" : goto ExitDo : end if
print ans
END DO
ExitDo:
waitkey
CLS
Hi Charles
Aha i see then ok ;)