Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: percent! - new datatype request

From: nitsch-lists:netcologne at: 6-Jun-2002 22:26

Am Donnerstag, 6. Juni 2002 20:35 schrieb Anton:
> To be consistent, > > 100 * 50% should give 5000%.
should give 50. to-percent 100 * 50% should give 5000%
> Addition and subtraction between integer and percent > types is ambiguous. What would you expect from > > 200 - 50% ? >
with-heavy-rabatt: $1999 - 30 %
> There are four different, but all, depending on your > point of view, correct, possibilities. > > Just remember that % means "per cent", or "divided by 100". > So 100% is not the same as 100. > > Not a bad idea overall, though. > > Regards, > > Anton. > > > hi, > > > > =09And with it you could do something like: > > >> 100 - 50% > > > > == 50 > > > > >> 100 + 50% > > > > == 150 > > > > >> 100 * 50% > > > > == 5000 > > > > Enjoy!! > > Ammon > > > > A short time ago, Andrew Martin, sent an email stating: > > > percent! - new datatype request > > > > > > It would be nice to see a percent datatype. It could be based on a > > > combination of the money! and decimal! datatype. percent! > > > > datatypes would > > > > > look like: > > > 100% > > > 1.23% > > > 0.456% > > > > > > I've send a copy to [feedback--rebol--com] > > > > > > Andrew Martin
nice idea :) next i want units :) -volker