Last Friday of each month: Difference between revisions

→‎{{header|Picat}}: Split into subsections.
No edit summary
(→‎{{header|Picat}}: Split into subsections.)
Line 3,202:
Year mod 400 == 0. </lang>
 
===Running the program===
There are several ways to run this program; let's call it "last_friday_of_each_month.pi":
 
===From Picat's shell:===
<pre>$ picat
$ picat
Picat> cl(last_friday_of_each_month)
Picat> show_year(2022)
Line 3,220:
2022-10-28
2022-11-25
2022-12-30</pre>
</pre>
 
===From the command line:, year as parameter===
Via <code>main(ARGV)</code>.
 
* With the year as a parameter, via main(ARGV):
<pre>$ picat last_friday_of_each_month.pi 2022</pre>
 
*===From Asthe command line, as a goal:===
<pre>$ picat -g "show_year(2022)" last_friday_of_each_month.pi</pre>
 
* ===Run the default goal (go/0):)===
<pre>$ picat last_friday_of_each_month.pi</pre>
 
 
=={{header|PicoLisp}}==
495

edits