12 Replies Latest reply on Aug 14, 2010 2:28 PM by LJ6m3gu9

    Does Alert.show put a message on the screen, or not?

    LJ6m3gu9 Level 1

                              var year:int;

                              var days:int;

                              days = 0;

                              year = 2010;

                              if (year > 2099)

                                    Alert.show("Unable to calculate day number for years beyond 2099.");  // Because, for example, 2100/2/29 will not exist

                              var T0:int;

                              T0 = days + ((year - 1964) / 4) * (3 * 365 + 366);  // This oomplex expression is evaluated incorrectly, so I have broken it down to help the compiler out

                              var T1:int;

                              var T2:int;

                              var T3:int;

                              var T4:int;

                              T1 = year - 1964;

                              T2 = T1 / 4;

                              T3 = 3 * 365 + 366;

                              T4 = T2 * T3;

                              days = days + T4;

                              if (T0 != days)

                                    Alert.show("Fault in evaluation because " + T0.toString() + " does not equal " + days.toString());