First Program
Posted: Tue Jan 08, 2013 3:45 am
Last night, I wrote my first QBASIC program, which went something like this:
CLS
FOR I% = 0 to 255
PRINT CHR$(I%);
NEXT I%
END
For some reason, the program began by printing ASCII character 014. I couldn't figure out what was going on, so I tried changing it to this:
CLS
FOR I% = 1 to 256
PRINT CHR$(I% - 1);
NEXT I%
END
This gave me an error message which led me to believe that the index variable in QBASIC is actually an array. So, what is going on in these programs? Please, don't give me the answer to this program, but if someone can give me a hint why these don't work, that would be great. Forgive my ignorance...I have only programmed before in UCBLogo
CLS
FOR I% = 0 to 255
PRINT CHR$(I%);
NEXT I%
END
For some reason, the program began by printing ASCII character 014. I couldn't figure out what was going on, so I tried changing it to this:
CLS
FOR I% = 1 to 256
PRINT CHR$(I% - 1);
NEXT I%
END
This gave me an error message which led me to believe that the index variable in QBASIC is actually an array. So, what is going on in these programs? Please, don't give me the answer to this program, but if someone can give me a hint why these don't work, that would be great. Forgive my ignorance...I have only programmed before in UCBLogo