Skip to content

Commit

Permalink
Add some links
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Dec 3, 2023
1 parent cc049a6 commit 0bc20f9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions day03/src/day03.alg
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
#define ROWS 140
#define COLS 140

comment An implementation of day 3 in ALGOL 60 (GNU MARST);
comment An implementation of day 3 in ALGOL 60 (GNU MARST)

comment Our symbols are mapped to integers as follows:;
comment | 0 | ... | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |;
comment | 0 | ... | 9 | . | * | + | $ | # | = | @ | / | % | & | - |;
Resources I found helpful while learning enough ALGOL 60 to implement this:

- https://www.gtoal.com/languages/algol60/marst-2.6/doc/marst.pdf
- https://www.algol60.org/5shortIntro.htm
- http://cs.ecs.baylor.edu/~maurer/SieveE/Algol60.htm
- http://www.math.bas.bg/bantchev/place/rpn/rpn.algol60.html

Our symbols are mapped to integers as follows:
| 0 | ... | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 0 | ... | 9 | . | * | + | $ | # | = | @ | / | % | & | - |;

Boolean procedure isInBounds(i, j); value i, j; integer i, j;
isInBounds := i >= 0 & i < ROWS & j >= 0 & j < COLS;
Expand Down

0 comments on commit 0bc20f9

Please sign in to comment.