Skip to content
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

Variable typo in original #19

Open
apthorpe opened this issue Apr 18, 2021 · 0 comments
Open

Variable typo in original #19

apthorpe opened this issue Apr 18, 2021 · 0 comments

Comments

@apthorpe
Copy link

Around like 1350 in main.f on the patches branch, you'll find

      IF (MAS4) SCORE=SCORE + 1
      ROOM = 100
      BRIEF= 0
      GOTO 20
  398 CONTINUE

BRIEF should be IBRIEF. This is the only occurrence of the variable BRIEF so it's pretty clear that IBRIEF was intended and this is a typo in the original code. This is not a transcription error.

This section of code is executed near endgame. The effect of setting IBRIEF to 0 is to disable brief (vs verbose) mode if it is enabled. Verbose mode is the default, the user has to manually change to brief mode. The intent of this code is to turn off brief mode if it's on so that the player sees the full endgame room description.

This is most probably a WONTFIX because it is not game-breaking, it's a faithful to the original code behavior (it's literally a bug in the original code), and it only triggers in the uncommon case that a player has brief mode set at endgame.

Extended Backstory

This was detected while disabling implied variable declaration, i.e. setting IMPLICIT NONE which causes the compiler to flag the use of undeclared variables as errors. Enabling IMPLICIT NONE is Rule No. 1 in Fortran programming for exactly this reason; you can silently use the wrong variable name and it's a pain to debug if you don't have implicit declaration disabled. This is the only error of this type I've found; in my modernization fork, I have IMPLICIT NONE set in all routines and and I can say with confidence that this is the only place where this class of error occurs.

Again, I expect this is WONTFIX; I'm logging it as another FYI for an eventual rewrite so players don't get all the way to the end just to see YOUR SCORE IS 299. KTHXBYE instead of the rich narrative text they deserve. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant