Re: IF <var> THEN
Posted in 1996
Mark D. Stock wrote: : ... : Both examples are correct. The first, IMO, is often more readable, : especially if the variable is named carefully. For example: : : IF update_complete : THEN : ....continue : ELSE : ....we had an error : END IF : : This form of the syntax requires the use of a BOOLEAN type. Now as : discussed on this group earlier, there IS NO BOOLEAN data type in : Informix. So you can use either SMALLINT or INTEGER. But why use : INT and waste 2bytes, when SMALLINT will do. : ... You can also use the CHAR type, and with the same reasoning: Why use SMALLINT and waste 1 byte when CHAR will do. To make things clearer, I use CHAR as the boolean type, while for single character variables, I use CHAR(1). So there, Informix-4gl does have a boolean type :) ---------------------------------------------------------------------- John H. Frantz Power-4gl: Extending Informix-4gl frantz@centrum.is http://www.strengur.is/~frantz/pow4gl.html