You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
3Even in your grandfather's FORTRAN, the fact that a constant must be passed by reference does not imply that the reference has to be "the one and only" instance of that value. Load the constant into a scratch location (on the stack if you have a stack) and set the argument to point to it.– daveCommented May 26, 2021 at 23:31
-
4And therefore, I regard passing a reference to a writeable "one and only" instance of a constant as a compiler bug - understandable in the context of the times, and who am I to criticize the pioneers, giants that they were, but nevertheless, it's still an implementation decision that does not match language semantics.– daveCommented May 26, 2021 at 23:48
-
2@texdr.aft - kalgol reports "FAIL 001 IN SECT.4.7.5.2." at run time. As should be perfectly obvious :-), this means an invalid use of an expression called by name. 'SECT.4.7.5.2' is a fixed part of this error message, it does not refer to anything in the original program. Compiler module? Design spec? Documentation reference? No idea. Kalgol always was a little opaque.– daveCommented May 28, 2021 at 1:59
-
2@another-dave Section 4.7.5.2 of the Algol 60 report: “A formal parameter which occurs as a left part variable in an assignment statement within the procedure body and which is not called by value can only correspond to an actual parameter which is a variable (special case of expression).” I missed this when looking through the report yesterday, but it nicely answers your original inquiry about whether a constant called by name can be assigned to.– texdr.aftCommented May 28, 2021 at 2:27
-
2@texdr.aft - Oh, duh: it's a reference to the Report. That's actually useful for an error message,– daveCommented May 28, 2021 at 3:00
|
Show 8 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>
[example](https://example.com)
<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. ms-dos), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you