Re: lab 5 PAL-based game

Ed Casas (edc@ece.ubc.ca) Thu, 8 Apr 1999 08:08:21 -0700


Date: Thu, 8 Apr 1999 08:08:21 -0700
From: Ed Casas <edc@ece.ubc.ca>
Subject: Re: lab 5 PAL-based game

> Could you please clarify how an if statement would be implemented in the > CUPL listing. > > example: for "if x<3, then y=0, else y=1" > where does the declaration # if x < 3 go? You can't do this. CUPL (as we use it) only deals with bits and logical operators (and, or, not, etc), it has no integer variables, if-statements or comparison operators. Note that CUPL statements "execute" concurrently, not sequentially. You can't implement algorithms in CUPL, only state machines and combinational logic (written as logical expressions). -- Ed Casas edc@ece.ubc.ca http://casas.ece.ubc.ca +1 604 822-2592