Some instances of CHARACTER*4 IOPSY2 being compared to truncated strings
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- fortran
- Domain
- data-visualization
Research direction
Start by checking Fortran character comparison rules and the IOPSY2 definition in DPCOHO.INC. Review the three comparisons in dp16.F and dp32.F, then investigate the assignments in dp1.F and edmai2.F. Done means confirming the intended four-character behavior and correcting any affected cases without changing unrelated logic.
Written by the indexing model from the issue text.
Description
IOPSY2 is defined in DPCOHO.INC as being 4 characters in size:
DPCOHO.INC: CHARACTER*4 IOPSY2
Most of the checks for the value of IOPSY2 compare the variable to a 4 character constant, like this:
dp14.F: IF(IOPSY2.EQ.'MAC ')THEN
But there are three instances where IOPSY2 is compared to a value less than 4 characters long, which I believe will prevent the desired .EQ. comparisons from doing what is expected.
dp16.F: ELSEIF(IOPSY2.EQ.'MAC')THEN
dp16.F: ELSEIF(IOPSY2.EQ.'MAC')THEN
dp32.F: ELSEIF(IOPSY2.EQ.'MAC')THEN
There are also three instances where IOPSY2 might be set to a value less than 4 characters long, but I don't know if those are significant:
dp1.F: IOPSY2='8'
dp1.F: IOPSY2='8'
edmai2.F: IOPSY2=' '
My last FORTRAN programming was in the 1980s, so I apologize if I'm misunderstanding how a CHARACTER*4 variable holding a 4 character value would be compared to a 3 character constant. Maybe 3 character constants are automatically padded with a space to be 4 characters in length. If that's the case, please feel free to close this issue with no reply.
Until today, the last time I looked over the DATAPLOT code base was when I did a port of DATAPLOT to a Prime minicomputer for the New York State Agricultural Experiment Station in Geneva, NY. Many of their faculty got much use from DATAPLOT in preparing graphs and charts for publications and presentations. Thank you very much for the large contributions that DATAPLOT made to those faculty's research. And I personally derived much satisfaction in helping the faculty move well beyond character-based plots and charts.
- Dominant language
- Fortran
- Stars
- 43
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from usnistgov/dataplot
-
License Open
Difficulty 1/5 Under an hour Newbie friendliness 38/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
All issues in usnistgov/dataplot
Similar issues
-
Urgent request: Due to vulnerabilities move to API version 12.6.1 (12.6.2 eventually) or 13.1.1 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jbkunst/highcharter#849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/OrgExplorer#245 · 1 assignee ·
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gordonwatts/test-wsl2-llm#151 ·