[pure-lang-svn] SF.net SVN: pure-lang:[567] pure/trunk/examples/libor/date.pure
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-08-22 10:38:59
|
Revision: 567 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=567&view=rev Author: agraef Date: 2008-08-22 10:39:04 +0000 (Fri, 22 Aug 2008) Log Message: ----------- Use new $$ operator for sequencing expressions. Modified Paths: -------------- pure/trunk/examples/libor/date.pure Modified: pure/trunk/examples/libor/date.pure =================================================================== --- pure/trunk/examples/libor/date.pure 2008-08-22 10:29:59 UTC (rev 566) +++ pure/trunk/examples/libor/date.pure 2008-08-22 10:39:04 UTC (rev 567) @@ -180,7 +180,7 @@ mayanleft = str (days2mayan (int nextcycle)); complete = 100.0*(phase 0 cycledays daytoday); -// usage = puts "Usage: pure -x date.pure [anyarg]" $ +// usage = puts "Usage: pure -x date.pure [anyarg]" $$ // puts "\tanyarg for help\n"; // usage with pure -x commented out to enable interactive and "using" modes @@ -191,27 +191,27 @@ puts "* New Calendar/Clock, Copyright (c) 2008 by Libor Spacek *"; puts "****************************************************************"; - puts ((strftime "%x" time) + "\t Gregorian date") $ - puts ((strftime "%X" time) + "\t local time") $ - puts ((gmparse utc time) + "\t UTC time") $ -// printf "%s \t UTC Time in h:t:d:s\n" (str (secs2htds (int secsnow)))$ - printf "%12.4f \t Julian day\n" jdaytoday $ - printf "%12.4f \t Mayan day\n" daytoday $ - printf "%s\t Mayan long count date\n" longtoday $ - printf "%6.4f \t days till the next full Moon\n" nextfmoon $ - printf "%7.4f \t days till the next inf. conjunction of Venus\n" nextvenus$ - printf "%9.4f \t days till the end of the Mayan cycle\n" nextcycle $ - printf "%s\t long countdown to the end of the cycle\n" mayanleft $ - printf "%11.8f %%\t completion of this cycle of >5125 years\n" complete $ + puts ((strftime "%x" time) + "\t Gregorian date") $$ + puts ((strftime "%X" time) + "\t local time") $$ + puts ((gmparse utc time) + "\t UTC time") $$ +// printf "%s \t UTC Time in h:t:d:s\n" (str (secs2htds (int secsnow))) $$ + printf "%12.4f \t Julian day\n" jdaytoday $$ + printf "%12.4f \t Mayan day\n" daytoday $$ + printf "%s\t Mayan long count date\n" longtoday $$ + printf "%6.4f \t days till the next full Moon\n" nextfmoon $$ + printf "%7.4f \t days till the next inf. conjunction of Venus\n" nextvenus $$ + printf "%9.4f \t days till the end of the Mayan cycle\n" nextcycle $$ + printf "%s\t long countdown to the end of the cycle\n" mayanleft $$ + printf "%11.8f %%\t completion of this cycle of >5125 years\n" complete $$ puts "****************************************************************"; // 2 = // another argument was presented -> print help and usage - puts "Mayan long count digits and their ranges of values:" $ - puts "Baktun(0-12) : Katun(0-19) : Tun(0-19) : Vinal(0-17) : Kin(0-19)" $ - puts "Baktun=144000days Katun=7200days Tun=360days Vinal=20days Kin=day" $ + puts "Mayan long count digits and their ranges of values:" $$ + puts "Baktun(0-12) : Katun(0-19) : Tun(0-19) : Vinal(0-17) : Kin(0-19)" $$ + puts "Baktun=144000days Katun=7200days Tun=360days Vinal=20days Kin=day" $$ puts "****************************************************************"; -// puts "\nNew clock digits and their ranges of values:" $ -// puts "hour(0-23) : tre(0-19) : dici(0-17) : second(0-9)" $ -// puts "hour=3600s : tre=180s : dici=10s : s=second\n" $ +// puts "\nNew clock digits and their ranges of values:" $$ +// puts "hour(0-23) : tre(0-19) : dici(0-17) : second(0-9)" $$ +// puts "hour=3600s : tre=180s : dici=10s : s=second\n" $$ // puts "Full time spec: Baktun:Katun:Tun:Vinal:Kin hour:tre:dici:second\n" ; // usage; // n = usage // any other number of arguments -> just print usage This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |