Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在fortran中访问字符串中的字符?如果我想将字符串“taco”的第一个字母存储在字符变量中,我该怎么做?
可以使用类似于数组部分的语法对字符变量和常量进行“子字符串化”。
a_character_variable = "taco"(1:1)
字符变量的子串也是一个变量——它可能出现在赋值语句的左侧。