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

We might want to change the file extension to .f95 to make the required standard explicit. We did that for some new routines with .f90.

@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.

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

3 participants