Rnd failing me in a For...Loop, Ideas?

kruze

Member
Licensed User
Can anyone tell me why the output from "message" is always in Uppercase although the random number is being generated within the FOR..LOOP?

B4X:
For i = 0 To StrLength(txtMessage.Text)-1
   rand = Rnd (0,1)
   If rand = 0 Then char = StrToUpper (StrAt(txtMessage.Text,i))
   If rand = 1 Then char = StrToLower (StrAt(txtMessage.Text,i)) 
   message = message & char
Next
 

kruze

Member
Licensed User
I should also properly read the CHM in more detail rather than presuming the syntax. Thanks for the swift reply
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…