View Full Version : Cystal Syntax question


wan2fly99
11-01-2007, 03:47 AM
Have this syntax

WhilePrintingRecords;
numberVar Discountable;


if (Datbase.Field1 = 1 ) then
Discountable := Discountable + (Datbase.Field2 *
Datbase.Field3)
else
Discountable := Discountable


Question:


Is := the same as an = syntax in Basic syntax?


Question:


Since field Discountable; is being defines in this detail line
display does it mean it will accumulate the valyues from each
database record as this line is printing


Thanks for any help new at this

Mile-O
11-01-2007, 09:41 AM
As I know it, := is for assignation, and = is for comparison, in Crystal Syntax.

Therefore, when assigning a variable:

DateVar myDate := CurrentDate;

And, when doing a comparison:

If Month(MyDate) = 12 Then

wan2fly99
11-02-2007, 05:05 AM
Thanks for the response I believe that is correct.

I like to use basic syntax instead