Sample UEB02D

Sample

Alternative zu Uebung 2A (Quartal) - jedoch mit STEM Variablen                                 

/* REXX UEB02D Copyright YCOS Yves Colliard Software 1990-2009 */
/* TRACE ?R  */
  /* einschalten des interaktiven Trace Modus */
  /* */
monat="07"
  /* */
q.1="erstes Quartal"
q.2="zweites Quartal"
q.3="drittes Quartal"
q.4="viertes Quartal"
  /* */
quart = (monat+2)%3      /* (Monat + 2) ganzahldivision 3 */
  /* quart:    (1 + 2) = 3 % 3 = 1  */
  /*           (2 + 2) = 4 % 3 = 1  */
  /*           (3 + 2) = 5 % 3 = 1  */
  /*           (4 + 2) = 6 % 3 = 2  */
  /*           (5 + 2) = 7 % 3 = 2  */
  /*           (6 + 2) = 8 % 3 = 2  */
  /*           (7 + 2) = 9 % 3 = 3  */
  /*           (8 + 2) =10 % 3 = 3  */
  /*           (9 + 2) =11 % 3 = 3  */
  /*          (10 + 2) =12 % 3 = 4  */
  /*          (11 + 2) =13 % 3 = 4  */
  /*          (12 + 2) =14 % 3 = 4  */
  /* */
say q.quart