The QBasic / QB64 Discussion Forum      Other Subforums, Links and Downloads
 
 

 Return to Index  

Another bug

December 15 2004 at 4:55 PM
Mac  (Login Mac36)


Response to Some explanation

 

Side note = Check this out
http://www.w1tp.com/enigma/EnigmaSim.zip

I ran it but was unable to figure out what I was doing.

Anyway, in the following code, I get "subscript out of range" if I enter the same settings as given in the other post, but instead use uppercase letters on inpus.

Suggested fix: Use LCASE$ when getting those letters.

Mac

' The Main Part of the code
DO
  FOR i = 1 TO 10
    IF Rotor(i).Curr = 1 THEN R$ = Letter(Rotor(i).Sett)
    IF Rotor(i).Curr = 2 THEN M$ = Letter(Rotor(i).Sett)
    IF Rotor(i).Curr = 3 THEN L$ = Letter(Rotor(i).Sett)
  NEXT i




    
This message has been edited by Mac36 on Dec 15, 2004 6:09 PM


 
 Respond to this message   
 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement  

Newbies usually go to www.qbasic.com and click on The QBasic Forum
Forum regulars have their own ways, which include The QBasic Community Forums