From 212c0445fee3dfad890493b8a2b3dd683a46f6ce Mon Sep 17 00:00:00 2001 From: JoeStrout Date: Sat, 16 Sep 2023 13:52:40 -0700 Subject: [PATCH] Fixed some minor issues with weekday.ms. --- .../95_Weekday/MiniScript/README.md | 7 ++++--- .../95_Weekday/MiniScript/weekday.ms | 17 +++++++++++------ .../96_Word/MiniScript/README.md | 7 ++++--- 68_Orbit/README.md | 2 +- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/00_Alternate_Languages/95_Weekday/MiniScript/README.md b/00_Alternate_Languages/95_Weekday/MiniScript/README.md index c6bd6267..218cb4cc 100644 --- a/00_Alternate_Languages/95_Weekday/MiniScript/README.md +++ b/00_Alternate_Languages/95_Weekday/MiniScript/README.md @@ -6,11 +6,12 @@ Ways to play: 1. Command-Line MiniScript: Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as: - +``` miniscript weekday.ms - +``` 2. Mini Micro: Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter: - +``` load "weekday" run +``` \ No newline at end of file diff --git a/00_Alternate_Languages/95_Weekday/MiniScript/weekday.ms b/00_Alternate_Languages/95_Weekday/MiniScript/weekday.ms index d3279001..fafa1bc6 100644 --- a/00_Alternate_Languages/95_Weekday/MiniScript/weekday.ms +++ b/00_Alternate_Languages/95_Weekday/MiniScript/weekday.ms @@ -1,5 +1,4 @@ TAB = char(9) -CR = char(13) Age = {"m": 0, "d": 0, "y": 0} Age.init = function(m,d,y) @@ -107,15 +106,18 @@ Date._leapYears = function end function print " "*32 + "WEEKDAY" -print " "*15 + "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"+CR+CR+CR +print " "*15 + "Creative Computing Morristown, New Jersey" +print; print; print print "WEEKDAY is a computer demonstration that" -print "gives facts about a date of interest to you."+CR +print "gives facts about a date of interest to you." +print -mdy = input("Enter today's date in the form: 3,24,1979?"+CR) +mdy = input("Enter today's date in the form: 3,24,1979? ") today = Date.init(mdy) -mdy = input("Enter day of birth (or other day of interest)"+CR) + +mdy = input("Enter day of birth (or other day of interest)? ") dob = Date.init(mdy) print @@ -139,6 +141,8 @@ age = today.diff(dob) totalAge = Age.init(age.m,age.d,age.y) if verb == " was a " then + if dob.d == today.d and dob.m == today.m then print "***HAPPY BIRTHDAY***" + lines= [["", "YEARS", "MONTHS", "DAYS"]] lines.push(["", "-----", "------", "----"]) lines.push(["Your age (if birthdate)", age.y,age.m, age.d]) @@ -174,4 +178,5 @@ if verb == " was a " then end for end if -print CR+"Yoy may retire in " + (dob.y + 65) +print +print " "*16 + "*** Yoy may retire in " + (dob.y + 65) + " ***" diff --git a/00_Alternate_Languages/96_Word/MiniScript/README.md b/00_Alternate_Languages/96_Word/MiniScript/README.md index 5e60340a..567a84ba 100644 --- a/00_Alternate_Languages/96_Word/MiniScript/README.md +++ b/00_Alternate_Languages/96_Word/MiniScript/README.md @@ -6,11 +6,12 @@ Ways to play: 1. Command-Line MiniScript: Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as: - +``` miniscript word.ms - +``` 2. Mini Micro: Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter: - +``` load "word" run +``` \ No newline at end of file diff --git a/68_Orbit/README.md b/68_Orbit/README.md index 9e4e9afd..be765b55 100644 --- a/68_Orbit/README.md +++ b/68_Orbit/README.md @@ -20,7 +20,7 @@ of orbit < ^ ship ``` -The distance of the bomb from the ship is computed using the law of consines. The law of cosines states: +The distance of the bomb from the ship is computed using the law of cosines. The law of cosines states: ``` D = SQUAREROOT( R**2 + D1**2 - 2*R*D1*COS(A-A1) )