Computer Science Canada My first if statement program. can't figure out problem. |
Author: | Freakish [ Wed Nov 02, 2005 7:49 pm ] | ||
Post subject: | My first if statement program. can't figure out problem. | ||
I made this program after reading a tutorial on if statments. I keep getting an error when I run it but I can figure out how to fix it.
|
Author: | Cervantes [ Wed Nov 02, 2005 8:56 pm ] |
Post subject: | |
In that if-[elsif ... elsif]-endif structure, only one if statement can be entered. In each one you give a value to one of set1, set2, or set3. The other two are never given a value. You then try to compare them, but you can't, since two of them never got a value. Fixing it would be to ensure that set1, set2, and set3 all have values. Alternatively, you could do away with set1, set2, and set3 (whatever they are). |
Author: | xXInsanityXx [ Wed Nov 02, 2005 9:25 pm ] |
Post subject: | |
Cervantes has already answered your question, but out of curiosity i have a couple of questions 1. What is the purpose of this program? 2. Is it trying to compare the numbers or trying to check if they are the same? |