[Remind-Fans] Modifying Borrowed Function

Jorge Luis lists at jorge.cc
Wed Nov 19 15:56:56 EST 2008


* Justin Alcorn <justin at jalcorn.net> [20081118 22:50 -0500]:
> Sorry:
> 
> The last line of .curweight looks like:
> 
> fset _curweight() 275
> 
> 
> On Tue, Nov 18, 2008 at 10:49 PM, Justin Alcorn <justin at jalcorn.net> wrote:
> 
> > INCLUDE /home/xxxxxxx/.curweight
> > fset _wtweeks() coerce("STRING", (trigdate()-today())/7) +
> > plural((trigdate()-today())/7, " week")
> > fset _wtweeksnum() choose((trigdate()-today())/7,1,(trigdate()-today())/7)
> > fset _wtdays() coerce("STRING", (trigdate()-today())) +
> > plural((trigdate()-today()), " day")
> > # 2 pounds per week
> > fset _pounds() coerce("STRING", (2*(trigdate()-today())/7)) +
> > plural(2*((trigdate()-today())/7), " pound")
> > fset _finweight() coerce("STRING",
> > (_curweight()-(2*(trigdate()-today())/7)))
> > # Set weight
> > fset _initweight() 280
> > fset _pounds() coerce("STRING", (_curweight() - _finweight()) +
> > plural(_curweight() - _finweight(), " pound"))
> > fset _sofar() coerce("STRING", (_initweight() - _curweight()) +
> > plural(_initweight() - _curweight(), " pound"))
> > fset _togo() _curweight() - _finweight()
> > fset _perweek() coerce("STRING",((_togo() / _wtweeksnum())+1) +
> > plural(((_togo() / _wtweeksnum())+1), " pound"))
> > #fset _wtoutput() coerce("STRING", _finweight() + " by " + _trigdate() + ".
> > You have " + _wtdays() + " (" + wtweeks() + ") to lose "+ _pounds() + ",
> > almost " + _perweek() + " per week")
> > fset _wtoutput() "Goal: " + coerce("STRING", _finweight() + " by " +
> > trigdate() + ". You have " + _wtdays() + " (" + _wtweeks() + ") to lose " +
> > _pounds() + ", almost " + _perweek() + " per week!" )
> > MSG Last Weigh-In [Blu] [_curweight()] [Nrm]
> > [REALTODAY()-FILEDATE("/home/xxxxx/.curweight")] days ago. %"%"%
> > REM MSG You have lost [_sofar()] in [trigdate() - '2008/01/01'] days, or
> > [(_initweight() - _curweight())/((trigdate() - '2008/01/01')/7) + 1] lbs per
> > week. %"%"%
> > REM MSG You have lost [_sofar()]%"%"%
> > REM Jan 2 2009 +90 MSG You are on track to weigh [_curweight() -
> > ((_wtweeksnum())*2)] pounds on [trigdate()] %"%"%
> > fset _finweight() 220
> > REM Dec 31 2009 +400 MSG [_wtoutput()] %"%"%
> >
> -- 
> Justin B. Alcorn
> The views expressed here are not necessarily my own, much less anyone
> else's.

Wow.  You've greatly increased the functionality of the script.  I can
adapt it to several uses now.

Thanks,

	JL

-- 
JL <lists at jorge.cc>
This message optimized for teletypes.




More information about the Remind-fans mailing list