This short code snippet does not work as expected...???
Posted: Thu Jul 18, 2013 9:19 am
Greetings All,
The following code does not work.
From my screen:
Thanks for your help...
Robert
.
The following code does not work.
From my screen:
What am i doing wrong, if anything...???===
Control BASIC v0.73
R-Run S-Step L-List E-Edit C-Configure B-Bank D-Download K-Reset T-Time & Date
Program Listing:
' create random passcode to enter and speak...
RNDpassword$ = ""
RNDpass$=STR$(INT(RND(9000)+1000)) ' random number between 1000 & 9999
? RNDpass$
FOR cnt = 1 TO 4
Z$ = MID$(RNDpass$,cnt,1)
RNDpassword$ = RNDpasswword$ + " " + Z$ '<<<<==== ERROR HERE ====####
NEXT cnt
? RNDpassword$
' It should result this example: RNDpass$ = "4094" = RNDpassword$ = " 4 0 9 4"
End of Listing
Control BASIC v0.73
R-Run S-Step L-List E-Edit C-Configure B-Bank D-Download K-Reset T-Time & Date
Start program
6289
No such variable line # 7
Program Ended.
Control BASIC v0.73
R-Run S-Step L-List E-Edit C-Configure B-Bank D-Download K-Reset T-Time & Date
===
Thanks for your help...
Robert
.
Code: Select all
' create random passcode to enter and speak...
RNDpassword$ = ""
RNDpass$=STR$(INT(RND(9000)+1000)) ' random number between 1000 & 9999
? RNDpass$
FOR cnt = 1 TO 4
Z$ = MID$(RNDpass$,cnt,1)
RNDpassword$ = RNDpasswword$ + " " + Z$ '<<<<==== ERROR HERE ====####
NEXT cnt
? RNDpassword$
' It should result this example: RNDpass$ = "4094" = RNDpassword$ = " 4 0 9 4"