hi,
Thanks for the stimulating thoughts...
I would personally expect to see the output data type be the same as the
*first* argument. I find that to be more consistent within REBOL (i.e. try
appending a path to a block, now a block to a path) so if you have an integer
and you subtract, add, divide.... it should affect the integer not the
percent. and if you are dealing with a number besides 100, it should be as
you said, "per cent" example:
>> 200 - 50%
== 100
>> 500 + 100%
== 1000
>> 100 - 75%
== 250
After all, if you don't evaluate it that way, you have lost the advantage
that you get from the datatype, or at least the most obvious reason that I
can see (what did you have in mind to use it for Andrew?).
Give me a point of view that would logically result in a different result
than I have given. (I am often too blind to the things around. ;-) and
while you are at it, please explain why 100 * 50% would result in a percent!
rather than an integer.
Thanks!!
Ammon
A short time ago, Anton, sent an email stating:
> To be consistent,
>
> 100 * 50% should give 5000%.
>
> Addition and subtraction between integer and percent
> types is ambiguous. What would you expect from
>
> 200 - 50% ?
>
> 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,
> >
> > And 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 [EMAIL PROTECTED]
> > >
> > > Andrew Martin
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.