Thank you for pointing that out....I wasn't aware of that

On 15 November 2016 at 03:32, Brad Collins <b...@chenla.la> wrote:

>
> It would be helpful to use a subject line a little more
> descriptive than "Subscribe" :)
>
> I have been deleting all email with the "Subscribe" subject line
> without reading them because I thought they were just people
> trying to sub to the list.  I usually set up filters on
> lists to auto-delete any email with "Subscribe" or
> "Unsubscribe", I'm glad I hadn't gotten around to it yet on
> this list....
>
> dean writes:
>
> > /*
> > I'm wondering where to cut the cake between prolog and pico/pilog
> > and thought I'd post a quick example to illustrate i.e.
> > initially I won't have individual values for variables
> > but a list of possibles and want the pc to pick the right values for me
> > using a system of (cast in stone) equations as a filter...just two in
> this
> > example.
> > Apparently for this to work I need to be use integers.
> > In reality the figures have decimal points so pico's fixed pt. maths
> looks
> > a good fit.
> >
> > Any thoughts re how to approach this in pico/pilog much appreciated.
> > */
> >
> >
> > :- use_module(library(clpfd)).
> >
> > main :-
> >    Lsales = [100,200,300],
> >    Lcogs = [10,20,30],
> >    Lgross_profit = [160,180,200],
> >    member(Sales,Lsales),
> >    member(Cogs,Lcogs),
> >    member(Gross_profit,Lgross_profit),
> >
> >    Ltax = [5,10,15],
> >    Lnet_profit = [100,170,300],
> >    member(Tax,Ltax),
> >    member(Net_profit,Lnet_profit),
> >
> >    Gross_profit #= Sales - Cogs,
> >    Net_profit #= Gross_profit - Tax,
> >
> >    format("Gross_profit ~w Sales ~w Cogs ~w\n",[Gross_profit,Sales,
> Cogs]),
> >    format("Net_profit ~w Gross_profit ~w Tax
> > ~w\n",[Net_profit,Gross_profit,Tax]).
> >
> > /*
> > ?- main.
> > Gross_profit 180 Sales 200 Cogs 20
> > Net_profit 170 Gross_profit 180 Tax 10
> > true ;
> > false.
> > */
> >
> >
> > As an aside....re the output of 'Ls...is it possible to remove the double
> > quotes when printing the symbols or CARs of the resultant list?/
> > I read that initially the VAL is the same as the symbol...and it
> > is....complete with double quotes.
> >
> > Thank you in anticipation and best regards
> > Dean
>
>
> --
> Brad Collins
> +855 010628234 | b...@chenla.la | Cambodia
> twitter: http://twitter.com/deerpig | github: http://github.com/deerpig
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to