<pre>function theDiscount invTotal,invDate,payDate,pPercent,pDays  get empty  if invTotal is not a number then whatNext invTotal && "n'est pas un total valide!"  else if pPercent is not a number then whatNext pPercent && "n'est pas un pourcentage valide dans les conditions de paiement!"  else if pPercent > 0 then    if pDays is not a number then whatNext pDays && "n'est pas un delai valide dans les conditions de paiement!"    else      put addDays(invDate,pDays) into maxDate      if payDate <= maxDate then get (invTotal * pPercent / 100)    end if  end if  return itend theDiscount</pre>