Re: Lab#4

Ed Casas (edc@ece.ubc.ca) Sat, 4 Nov 2000 12:12:18 -0800


Date: Sat, 4 Nov 2000 12:12:18 -0800
From: Ed Casas <edc@ece.ubc.ca>
Subject: Re: Lab#4

> I would like to know why 'else' loops don't work in the lab. > Ever time I implement one in my code, the 'else' loop is the > only loop that is run, whether it should be or not??? If only the 'else' part is executed then the if's controlling expression must always be evaluating to zero. If you can't figure out why the expression evaluates to zero you can write a simple program that evaluates the expression and compile/run it with Turbo C. If you're uncertain about the values of switch inputs you can write a simple program that copies switch inputs to LED outputs. Remember to mask out bits that are not hooked up to switches since you can't predict what their values will be. -- Ed Casas edc@ece.ubc.ca http://casas.ece.ubc.ca +1 604 822-2592