-
-
Notifications
You must be signed in to change notification settings - Fork 6
initial proposed changes to Ep2 - Basics #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thank you!Thank you for your pull request 😃 🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}. If you have files that automatically render output (e.g. R Markdown), then you should check for the following:
Rendered Changes🔍 Inspect the changes: https://github.com/carpentries-incubator/intro-to-modern-fortran/compare/md-outputs..md-outputs-PR-29 The following changes were observed in the rendered markdown documents: What does this mean?If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation. ⏱️ Updated at 2025-05-19 09:20:21 +0000 |
| program example3 | ||
| implicit none | ||
|
|
||
| real, parameter :: pi = 3.14159265 | ||
|
|
||
| end program example3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally think it would be useful to either expand this example to show the (compile-time) failure if you try to modify pi or leave this is an exercise so users can cause the error themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - I'll work on this.
Co-authored-by: Warrick Ball <warrickball@gmail.com>
Co-authored-by: Warrick Ball <warrickball@gmail.com>
|
I've now added the example error when trying to alter a parameter |
Co-authored-by: Warrick Ball <warrickball@gmail.com>
Co-authored-by: Warrick Ball <warrickball@gmail.com>
fcb2bf3 to
bef7877
Compare
…a solutions directory.
… exercises dir with the correct sub dir names
…k of) for parameter kind conversion
jklebes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested building this as local webpage. I didn't test downloading the exercises or running the code examples.
Things were a bit confusing because of file 02-basiscs.Rmd, which is not displayed online and contains duplicate material. I made some duplicate comments. It looks like migration of content from Basics file to other files is unfinished, e.g. 05-strings is empty with the content in basics.
The content itself seems good and complete, with the minor comments. The formatting and writing is good.
I would finish the migration from 02-Basics and then merge PR, to change other details later.
|
|
||
| 1. Make sure your code conforms to the style | ||
| followed by this course. | ||
| 2. Add Ford comments to document the program |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has never been introduced
|
|
||
| number_of_pelicans = 5 | ||
| pelican_weight = 2.5 ! kg | ||
| pelican_population_dynamics = (-1.2e3, 0.9e2) ! births, deaths per year |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unusual use of a complex number , maybe it's better to have no complex example here
|
|
||
| | Relation | Operator | Older form | For | | ||
| |--------------------------|----------|------------|------------------| | ||
| | Less than | `< ` | `.lt.` | `integer` `real` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put commas in these lists in table
| Equivalence between two logical expressions or variables is established | ||
| via the logical operators `.eqv.` and `.neqv.`. | ||
|
|
||
| While some some compilers may allow the use of `==`, this should be avoided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "to compare logical expression" - restate to be extra clear that this applies to logical and "==" should not be avoided in general.
| T | ||
| ``` | ||
|
|
||
| ## Character variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Draft content to be moved to file 05-strings ?
|
|
||
| ::: | ||
|
|
||
| ::: caution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the big red warning box is a bit too attention-grabbing for this non-essential warning
|
|
||
| 1. Make sure your code conforms to the style | ||
| followed by this course. | ||
| 2. Add Ford comments to document the program |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has not been introduced
| Equivalence between two logical expressions or variables is established | ||
| via the logical operators `.eqv.` and `.neqv.`. | ||
|
|
||
| While some some compilers may allow the use of `==`, this should be avoided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "when comparing logicals." , being explicit
| ```fortran | ||
| ! This goes after the program statement | ||
| ! We will cover modules in a later episode | ||
| use, intrinsic :: iso_fortran_env, only: r_32 => real32, r_64 => real64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just use the default names real32 to keep this use statement simple in number of new syntax/concepts to understand (and fitting on a line when displayed in browser)
|
|
||
| :::::::::::::::::::::::::::::::::::::::: keypoints | ||
|
|
||
| - Th |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfinished
These are some initial suggestions for content for Episode 2 - Basics, primarily using the EPCC course as inspiration but simplifying things somewhat.