Immediate (=) and Delayed (:=) Assignment
When an "=" is used in an assignment, the current value of the right-hand-side is assigned to the left-hand-side.
This assignment may not be very useful if we wanted to use the "current time" as a variable some time later.
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Sun 7 Sep 2008 11:48:31 |
Instead, what we probably want is to have the right-hand-side evaluated when it is used. This is delayed assignment (:=)
Below, Pause is used in a compound statement to show that the value associated with theFlexibleDate is updating
Sun 7 Sep 2008 11:48:32 |
Sun 7 Sep 2008 11:48:34 |
Sun 7 Sep 2008 11:48:37 |
Sun 7 Sep 2008 11:48:41 |