Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数组赋初值有负数引起的错误 #11

Open
bmz-q-q opened this issue Sep 7, 2022 · 0 comments
Open

数组赋初值有负数引起的错误 #11

bmz-q-q opened this issue Sep 7, 2022 · 0 comments

Comments

@bmz-q-q
Copy link
Collaborator

bmz-q-q commented Sep 7, 2022

program main
  real,dimension(3,4):: a(3,4)=(/1,-2,3,4,5,6,7,8,9,10,11,12 /)
  real(fullR), parameter :: EdgeFixedCompVal(4) = (/-1.0, 1.0, 1.0, 1.0/) ! fixed component value
  real(fullR), parameter :: NodePrntCoord(2,CONST_NUM_SHELL_NODE) = (/(/-1.0, -1.0/), (/1.0, -1.0/), (/1.0, 1.0/), (/-1.0, 1.0/)/)
 
end program

负数会自动加括号,在regen_arraybuilder函数中
for(std::string e:elem_list)
e会识别成(-1.0), 正常情况应是 -1.0
运行到 argtable.get_what()+=std::to_string(std::stoi(e))+".,";
使std::stoi报错。

YHN-ice pushed a commit that referenced this issue Sep 29, 2022
construction function between compatible different-type farrays.
related issue #11, the test case should work fine now.
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

No branches or pull requests

1 participant