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

 Return to Index  

A bug

December 15 2004 at 4:51 PM
  (Login Mac36)


Response to Some explanation

 

In the following code, on entering the 27th input character, I get "subscript out of range":

FOR i = 1 TO 26
  IF Reverse = 0 THEN
    IF INP$ = Letter(i) THEN
      OUT$ = Rotor(RotorPosistion(i))
    END IF
  ELSE
    IF INP$ = Rotor(RotorPosistion(i)) THEN
      OUT$ = Letter(i)
    END IF
  END IF
NEXT i

Using the following input
2 4 6
m a r
p q h
2
4
8 11
7 13
4 12
17 3

And entering 27 A's
A is a G
A is a T
A is a Z
....


Mac


    
This message has been edited by Mac36 on Dec 15, 2004 4:56 PM


 
 Respond to this message   
Response TitleAuthor and Date
I am working on those* (View Thread)Iain on Dec 16
 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