Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • lfortran lfortran
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 432
    • Issues 432
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 72
    • Merge requests 72
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lfortranlfortran
  • lfortranlfortran
  • Merge requests
  • !1707

Fixing adjustl

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ubaid Shaikh requested to merge shaikhubaid769/lfortran:fixing_adjustl into master Apr 19, 2022
  • Overview 3
  • Commits 8
  • Pipelines 6
  • Changes 5

an attempt towards fixing #683 (closed) .

To work perfectly, it needs len() to be fixed #677 (closed)

Example code:

program test_adjustl
    character(len = 20) :: str = adjustl("    gfortran")
    print *, "|"//str//"|"
end program test_adjustl

gfortran output:

ubaid@ubaid-Lenovo-ideapad-330-15ARR:~/Desktop/My-Projects/GSoC/lfortran$ gfortran Testing/Temporary/main.f90 
ubaid@ubaid-Lenovo-ideapad-330-15ARR:~/Desktop/My-Projects/GSoC/lfortran$ ./a.out 
 |gfortran            |

lfortran output:

ubaid@ubaid-Lenovo-ideapad-330-15ARR:~/Desktop/My-Projects/GSoC/lfortran$ ./src/bin/lfortran Testing/Temporary/main.f90 
ubaid@ubaid-Lenovo-ideapad-330-15ARR:~/Desktop/My-Projects/GSoC/lfortran$ ./a.out 
|gfortran    |

The reason it does not work perfectly is that the len function returns a length of 12 instead of the original length of 20.

Edited Apr 22, 2022 by Ubaid Shaikh
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fixing_adjustl