lsame: simplify using IACHAR by jschueller · Pull Request #1303 · Reference-LAPACK/lapack · GitHub
Skip to content

lsame: simplify using IACHAR#1303

Open
jschueller wants to merge 1 commit into
Reference-LAPACK:masterfrom
jschueller:issue701
Open

lsame: simplify using IACHAR#1303
jschueller wants to merge 1 commit into
Reference-LAPACK:masterfrom
jschueller:issue701

Conversation

@jschueller

Copy link
Copy Markdown
Contributor

Replace ICHAR with the F95 intrinsic IACHAR, which always returns ASCII codes regardless of the platform's native character encoding. This eliminates the entire EBCDIC/Prime machine detection branch (logic testing ZCODE against ASCII/EBCDIC/Prime codes), producing shorter, simpler, and equivalent code.

Closes #701

Replace ICHAR with the F95 intrinsic IACHAR, which always returns
ASCII codes regardless of the platform's native character encoding.
This eliminates the entire EBCDIC/Prime machine detection branch
(logic testing ZCODE against ASCII/EBCDIC/Prime codes), producing
shorter, simpler, and equivalent code.

Closes Reference-LAPACK#701
@ACSimon33

Copy link
Copy Markdown
Contributor

@jschueller

Copy link
Copy Markdown
Contributor Author

ah, yes, I did not get that, are we allowed to use f95 in lapack though ?

@langou

langou commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

(1) I'd be OK to allow F95
(2) if we do F95, it would be good practice to indicate it in the file name as suggested by @ACSimon33
(3) in the past, I would have argued to move the current lsame.f to the "deprecated" folder, but I guess that's why we have source control so I think changing lsame.f and not keeping an older version is just fine.

More comments on the wisdom to allow F95 welcome.

@imciner2

Copy link
Copy Markdown

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

Successfully merging this pull request may close these issues.

Simplify lsame

4 participants